OAKLAND, Calif. — Just as government officials step up their antitrust scrutiny of the American tech giants, Google had a surprising announcement on Thursday: It is buying another company.

Google said it planned to buy the data analytics company Looker for $2.6 billion in a bid to catch up to rivals in the business of cloud computing.

The transaction, which is subject to government approval, will be an immediate test for regulators.

“A few years ago, this deal would have been waved through without much scrutiny,” said Paul Gallant, a tech analyst with Cowen who focuses on regulatory issues. “We’re in a different world today, and there might well be some buyer’s remorse from regulators on prior tech deals like this.”

A primary argument against the tech giants’ power is their history of gaining size by acquiring other companies, and some politicians have suggested breaking up corporations like Google and Facebook.