A budget stalemate that gripped the nation ended just before a midnight deadline Friday as congressional leaders and the White House agreed to a package of spending reductions to avert a federal government shutdown.
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 Speaker John 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.
Later that morning, Obama phoned the speaker. According to a senior White House official familiar with the talks, he told Boehner: "I'm the president of the United States; you're the speaker of the House. We are the two most consequential leaders in the United States government. We had a discussion last night, and what's happening now in terms of the negotiations doesn't reflect that.
"We love our staffs, but this is about us. We had a discussion, and today if we have any hope of keeping government open from this point forward, what we talked about last night has to be reflected in the negotiations."
In one of several White House meetings with Obama, the two sides worked line by line through a list of GOP policy demands, accepting some, rejecting others.
In the end, provisions to curtail the Environmental Protection Agency's ability to regulate air and water pollution, including greenhouse gases that cause global warming, had been top points of contention, and were dismissed.
Also dropped were nine separate provisions that would curtail the ability of the administration to implement the nation's new healthcare law. Instead, negotiators agreed to hold a separate vote in the Senate on a proposal to defund the law.
More than a dozen other provisions were accepted, including one that would prohibit the District of Columbia from using local tax funds for organizations that provide funding for women seeking abortions.
Republicans also wanted to redirect family planning funds from the Nixon-era Title X program to state control, giving local officials more authority over which healthcare providers receive the money and presumably reducing or eliminating any funding for Planned Parenthood.
Under existing law, federal funds may not be used for abortions, except in rare health-related situations. Instead of including the move as part of the budget, the two sides agreed to hold a separate vote later on the proposal.
"We have agreed to an historic amount of cuts," Reid and Boehner said in a joint statement about the deal.
Boehner, countering Democratic charges, had contended throughout the day that the stalemate was over spending levels. In an upbeat talk to his rank-and-file, he received two standing ovations in support of his insistence on tougher cuts.
The speaker has been under pressure from his more conservative new caucus, including the large freshman class, to push for steeper spending reductions.
But even the most fiscally conservative lawmakers spoke up during the closed-door caucus meeting, indicating that they were prepared to support whatever deal Boehner cut, according to those in the meeting.
Late Friday, Boehner described the deal to Republicans as the largest real-dollar spending cut in American history, but added that there was much more work to do.
"We've got more than half of what we wanted," said Rep. Paul Ryan (R-Wis.), who chairs the House Budget Committee.
Christi Parsons, James Oliphant and Michael A. Memoli in the Washington bureau contributed to this report.