The U.S. government on Wednesday sued to block AT&T Inc's $39 billion purchase of T-Mobile USA, citing concerns it will harm competition in the wireless market and lead to higher prices.

The surprise move, which was the biggest antitrust challenge yet by the Obama administration, caught the carriers by surprise and if successful would end AT&T's move to unseat Verizon Wireless as the No. 1 U.S. mobile carrier.

If AT&T fails to defeat the Justice Department lawsuit, it will prove very costly -- the No. 2 carrier would have to pay T-Mobile parent Deutsche Telekom an estimated $6 billion in cash and other assets as part of the original deal.

The announcement is a slap in the face for AT&T Chief Executive Randall Stephenson, who was poised for a career-defining deal that would allow him to emerge from the shadow of predecessor and serial acquirer Ed Whitacre.

The court case could take months and cost millions of dollars. Wall Street immediately signaled the deal was likely now a longshot, with shares in the companies falling sharply.

Justice Department officials warned that allowing AT&T to gobble up the No. 4 carrier would be disastrous for consumers.

Were the merger to proceed, there would only be three providers with 90 percent of the market, and competition among the remaining competitors on all dimensions, including price, quality and innovation, would be diminished, Deputy Attorney General James Cole told reporters.

The lawsuit came only five months after the deal was announced and despite the surprising timing, one source close to the case said it was a real attempt to halt a fundamentally flawed deal, not a tactic to wring big concessions from AT&T.

They would have to give up so much to win approval, the source said. Still, Justice Department officials said they were willing to consider proposals to ameliorate their concerns, but they expected to the fight to shift to federal court.

A source close to one of the carriers said they may have to offer to divest up to 25 percent of the combined company's assets, up from an earlier estimate of up to 10 percent, to try to save the deal.

James Ratcliffe, an analyst at Barclays Capital slashed his expectations that the deal would win approval to a range of 35 percent to 40 percent, down from 75 percent.

CAUGHT BY SURPRISE

The government's lawsuit overshadowed an announcement just hours earlier by AT&T that it would bring back 5,000 call center jobs to the United States if the deal closed.

Just a day ago, the two sides had met to continue discussions on the merger and the Justice Department dropped no hints that it was getting frustrated with the talks.

The two sides were talking past each other, said one source familiar with the case, adding that the Justice Department side felt that nothing was really presented to address their competition concerns.

AT&T's Stephenson has argued that his company needs T-Mobile to get more wireless airwaves to meet exploding demand for high-speed mobile services from smartphones and tablets.

Stephenson put himself on the line with this deal so he has no choice but to double down, said a person close to AT&T. [ID:nN1E77U26Q]

Shares of AT&T closed down 3.8 percent at $28.48 on the New York Stock Exchange, while Deutsche Telekom shares fell 7.6 percent to 8.81 euros in Frankfurt trade.

This one took everybody by surprise, said a person close to one of the carriers, adding that they thought the Justice Department would ask for concessions but not derail the deal.

Meanwhile shares of Sprint Nextel Corp -- the No. 3 U.S. wireless carrier, which has fiercely opposed the deal -- shot up almost 6 percent to close at $3.76. A scuppered acquisition could prompt Sprint to consider buying T-Mobile.

AT&T's high-powered lobbying team in Washington is led by Jim Cicconi, who previously worked in the Reagan and Bush administrations.

We thought the weight of AT&T's lobbying was having some success; this very much undermines that. It's very uncertain where this leaves us at the moment, said Andrew Hogley, telecom analyst at Espirito Santo investment bank.

If the government succeeds in blocking the deal, it would also be a major setback for Deutsche Telekom, which for years has been looking for a way out of T-Mobile USA, a business that has ceased to be a source of growth.

Deutsche Telekom will gain some short-term consolation from the penalties it can exact from AT&T, said John Delaney, an analyst at technology research firm IDC. But in the end, DT would still be stuck with the problem of how to turn around a sub-scale national operator with a declining subscriber base.

The news also sent chills through the mergers and acquisitions market. Not only do the seven investment banks that advised on this deal stand to lose about $150 million in fees, but bankers elsewhere were also worried it could make companies think twice about antitrust risk when mulling takeovers.

COURT BATTLE

Antitrust experts saw this case as the signature antitrust event for the Obama administration, which includes former AT&T executive William Daley serving as White House chief of staff.

This is an administration that came in saying it was going to have a more aggressive approach, said Michael Sohn, an antitrust attorney with Davis Polk Wardwell LLP.

The administration has cleared some big deals like Comcast Corp's purchase of NBC Universal, but Nasdaq OMX Group Inc and IntercontinentalExchange withdrew a hostile bid for NYSE Euronext after opposition from antitrust regulators.

I think the court is going to block it, said Andy Gavil, who teaches law at Howard University in Washington and testified to Congress on the deal. Having read the complaint, I don't see a basis for a negotiated settlement.

One thing most experts agree on is that it would take a long time for the case to wind its way through the courts. The question remains whether the companies are willing to pursue that route and for how long, or go their separate ways.

Another complicating factor is that the deal also needs approve by the Federal Communications Commission, which regulates wireless communications.

Although our process is not complete, the record before this agency also raises serious concerns about the impact of the proposed transaction on competition, said FCC Chairman Julius Genachowski.

The case is USA v. AT&T Inc et al, No. 11-cv-1560 in U.S. District Court for the District of Columbia.

(Additional reporting by Diane Bartz and Jasmin Melvin in Washington, Nadia Damouni in New York, Georgina Prodhan and Victoria Howley in London, Nicola Leske in Berlin, and Edwin Chan in San Francisco. Editing by Robert MacMillan, Gary Hill)