AT&T has dropped its controversial $39 billion bid for Deutsche Telekom's wireless U.S. unit, bowing to regulatory opposition over the deal that would have made it the largest cellphone operator in the country.

AT&T had said it urgently needed to buy T-Mobile USA to help overcome a spectrum shortage, while Deutsche Telekom saw it as a way to exit the U.S. market to focus on its European operations. Once a cash cow, T-Mobile USA has been loosing customers.

An agreed $3 billion break up fee to be paid by AT&T, roaming agreements with AT&T and additional mobile licenses for T-Mobile USA will soften the blow but puts Deutsche Telekom back at square one.

It was definitely a miscalculation (by AT&T), said Steve Clement, an analyst at Pacific Crest Securities.

I don't know that it's such a big deal to the extent that you're going to have people looking for a change of management (at AT&T). But they definitely miscalculated what they would be able to push through to regulators' he said.

AT&T will have to look elsewhere for the wireless airwaves it has said it needs to support the high demand for mobile data services and to compete with larger rival Verizon Wireless, which has agreed to buy spectrum from cable operators.

AT&T's plan to buy T-Mobile USA, first announced in March, met with fierce opposition from the U.S. Department of Justice and the Federal Communications Commission and industry skepticism from the start.

Late in November, AT&T and Deutsche Telekom withdrew their application for FCC approval to focus on addressing Justice Department concerns.

At the time AT&T said it would take a $4 billion charge in case the deal collapsed, including a $1 billion book value for the spectrum AT&T would have to give to T-Mobile USA.

Deutsche Telekom said on Monday it would return to reporting T-Mobile USA as part of its continuing operations and that its group forecast for 2011 of expected earnings before interest, tax, depreciation and amortization (EBITDA) of around 19.1 billion euros ($24.86 billion) would be unchanged.

It's a bigger blow to Deutsche Telekom in that they were getting a good price for that mobile asset and I don't' think there's an alternative that's nearly as good for them, Clement said.

Deutsche Telekom had planned to use the proceeds from the sale to pay down debt, launch a 5 billion euro ($6.51 billion)share buyback program, and step up investments at home and in Europe.

Deutsche Bank, Credit Suisse, Morgan Stanley and Citigroup, which advised T-Mobile, and AT&T's banks, which included Greenhill, Evercore and JPMorgan, stand to lose a total of $150 million in fees, according to earlier estimates from ThomsonReuters/Freeman Consulting.

($1 = 0.7682 euros)

(Additional reporting by Alexei Oreskovic in San Francisco, Sinead Carew in New York; Editing by Phil Berlowitz)