US says Pak must act against terror groups, urges “restraint”