Who says Congress never gets anything done? Pressed into action by the ongoing budget crunch, lawmakers have agreed to let the federal government raise as much as $25 billion by auctioning off valuable wireless spectrum, promising better mobile service for tens of millions of consumers and opening up new frequencies for next-generation WiFi networks. Proceeds from the auction will also be used to fund a nationwide, interoperable emergency services network, which has been a major goal for first responders for over a decade.

The wireless agreement, contained in legislation to extend the payroll tax cut and provide jobless benefits for millions of Americans, is a rare instance of agreement in Washington D.C., not only by Democrats and Republicans, but by various wireless industry stakeholders, including the biggest service providers, broadcast networks, and technology firms. In the end, it took the budget crisis to spur lawmakers to act: $15 billion from the spectrum auction will go toward the $30 billion cost of the jobless benefits; the rest will come from higher contributions from federal workers.

After the House and Senate voted Friday to pass the legislation, praise for the deal poured in from the wireless industry, public interest groups, and internet companies. President Obama is expected to sign the bill shortly.

Under the plan, the Federal Communications Commission will auction off unused wireless spectrum currently owned by TV broadcasters. In return, the the broadcasters will get a chunk of the auction proceeds, estimated to be nearly $2 billion. Wireless companies like AT&T and Verizon will be able to buy the newly-available spectrum, and then deploy it to bolster mobile broadband networks nationwide to address the growing “spectrum crunch” fueled by exploding wireless data usage. Jim Cicconi, AT&T’s top policy executive praised the plan in a company blog post. “We applaud House and Senate negotiators for doing something truly important to our nation – successfully crafting major spectrum legislation,” Cicconi wrote.

CTIA, the wireless industry trade group, which has warned of a looming spectrum shortage for years, also hailed the deal, calling it “a resounding victory” for consumers and the American economy. “Making spectrum available will make it possible for America’s wireless carriers to offer consumers better, faster, more ubiquitous wireless broadband service,” said CTIA president Steve Largent, who estimates that mobile data usage will grow by a factor of 16 over the next five years.

The plan allocates $7 billion in proceeds from the auction to create a much-needed national, interoperable emergency wireless network, a key priority of the Obama administration. Construction of the new network, which will allow various public safety agencies to communicate with each other — a capability that was sorely lacking on 9/11 — will be managed by the National Telecommunications and Information Administration. The plan also includes provisions for updating the nation’s 9-1-1 system to include the use of text messages, photos and videos to help public safety agencies better respond to emergencies.

Finally, the plan will allow free access to unlicensed airwaves — like those used by WiFi and Bluetooth devices — in the broadcast TV spectrum. This is a major victory for technology companies like Google and Microsoft, which have been lobbying vigorously for such spectrum to be available. In this case, the spectrum chunks are so-called “white spaces” — the frequencies in between TV broadcast stations — that can be used to create “super-Wifi” networks, which will have much greater range than current Wi-Fi networks. “Today’s news is undeniably good for unlicensed spectrum, a public resource that drives economic growth and spurs technological innovation,” Matt Wood, Policy Director at Free Press, said in a statement. “Unlicensed spectrum is vital for Internet companies building tomorrow’s technologies and rural providers bringing broadband to unserved portions of the nation.”

It’s a rare day when interest groups that are frequently at loggerheads — wireless providers, broadcast networks, internet companies and public interest groups — can come together in praise of a piece of legislation. Maybe next time, policy-makers will act in the best interests of the public without a budget crisis forcing them to do so.