Companies never want to see their merger talks leak, but AT&T Inc. was especially concerned.

The former Baby Bell, which built itself up through a decade of acquisitions into the country's largest telecommunications company, was planning to buy T-Mobile USA, a deal that would test its skilled regulatory team in Washington.

The combination would bring together the second and fourth largest U.S. wireless operators by revenue, creating a giant in an already concentrated market. People familiar with the matter said AT&T executives, fearing a leak could build regulatory opposition even before the two sides agreed on a deal, kept the number of banks involved strictly limited for weeks. It leaned on J.P. Morgan Chase & Co. alone to provide a $20 billion loan.

In the end, the secret held, ushering in a $39 billion acquisition that is as much a wager on the political environment in Washington as it is a bet on the future of the wireless market.

The deal comes as the Obama administrationhas signaled it will police mergers more aggressively than the prior Republican administration. The Federal Communications Commission, which also can effectively veto the deal, is wrestling with how to widen access to mobile broadband services and preparing to issue a report that raises fresh concerns about competitiveness in the wireless market.