After working around the clock, Republican and Democratic negotiators emerged from a tense day of closed-door talks with a deal that would cut about $38 billion from domestic programs across the nation for the remaining six months of the 2011 fiscal year.
Republicans dropped healthcare and environmental demands that had stalled agreement on the budget deal and, in return, the two sides agreed to hold separate votes later on other GOP goals, including cutting family planning funding.
The House and Senate quickly approved a stopgap measure to keep the government running until they can consider the full package next week.
The lengthy political ordeal leading to Friday's agreement pointed to the difficulty ahead when Congress must consider even more difficult questions concerning the country's debt limit, the 2012 budget, Medicare funding and other issues.
The battle down to the last moment before a shutdown increased anxiety in a nation struggling economically and provided an indication of the political risks that could have resulted from the first federal government shutdown in 15 years.
The mere threat of a shutdown sparked a procession of negative economic news Friday. It fueled a decline in the dollar's value, which in turn helped push up oil prices by 2.3%, to more than $112 a barrel, some analysts said. The shutdown also was cited as a main cause of a 30-point drop in the Dow Jones industrial average.
"Like any worthwhile compromise, both sides had to make tough decisions and give ground on issues that were important to them, and I certainly did that," President Obama said in a late-night address from the White House.
But throughout the day, blame ricocheted across the capital, raising and then dashing hopes for a resolution to the 2-month-long budget standoff to fund the federal government through Sept. 30.
"When we say we're serious about cutting spending, we're damn serious about it," House SpeakerJohn A. Boehner (R-Ohio) said after a midday meeting with rank-and-file Republicans. "We're not going to roll over and sell out the American people, like it's been done time and time again here in Washington."
Democrats worked to portray the GOP as pursuing a radical, "tea party"-inspired agenda, combining massive cuts in domestic programs with conservative social objectives such as cuts in family planning and women's health programs.
Standing en masse behind Senate Majority Leader Harry Reid (D-Nev.), Senate Democrats said they had compromised enough and would fight the GOP's attempt to restrict family planning funds, one of the last key issues that was preventing a deal to keep the government running.
"The fact that Republicans have made this about women's health and not about money … is really a sham," Reid said.
Full details about the cuts were not immediately known. The stopgap measure would fund government operations through Thursday, using $2.5 billion in unused transportation funds. Those cuts would be counted toward the overall reductions.
Democrats pursued reductions from one-time cuts and accounts with surpluses. In the end, about half the cuts, nearly $18 billion, come from such areas.
Republicans had preferred lasting cuts to federal agency operations, which would be more politically difficult to reinstate in budget battles to come.
Democrats backed off steeper cuts to the Defense Department in the face of GOP opposition.
The long-awaited deal Friday night was the latest development in a weeklong drama. Negotiators worked around the clock Thursday night, but any apparent progress was shattered Friday morning. Both sides said they had hit an impasse hours after a late meeting with Obama in the White House.
Reid was alerted by a 4 a.m. email from a top aide that talks had broken down.