WASHINGTON — President Barack Obama and congressional leaders reached a historic, last-minute agreement just before a midnight deadline to slash about $38 billion in federal spending and avert the first federal government shutdown in 15 years.
Obama hailed the deal as "the biggest annual spending cut in history." John Boehner, the Republican speaker of the House of Representatives, said that over the next decade it would cut government spending by $500 billion, and won an ovation from his rank and file — conservative Tea Party adherents among them.
"Today Americans of different beliefs came together again," Obama said from the White House Blue Room, a setting chosen to offer a clear view of the Washington Monument over his right shoulder.Video: Obama: US govt. is ‘open for business’ (on this page)
Amid the biggest clash yet between Democrats and the resurgent Republicans who control the House, Obama had warned that a shutdown would damage the economy's recovery by putting an estimated 800,000 government employees out of work.
The political stakes of a shutdown were huge ahead of next year's presidential and congressional elections. During the last government shutdown during Bill Clinton's presidency, Republicans got most of the blame in — but there was no assurance that would have happened again.
They announced the agreement less than an hour before government funding was due to run out, instantly turning hundreds of thousands of furlough notices for federal workers into historical relics.
The shutdown would have closed national parks, tax-season help lines and other popular services, though the military would have stayed on duty and other essential efforts such as air traffic control would have continued in effect.
"Tomorrow I'm pleased to announce that the Washington Monument, as well as the entire federal government, will be open for business and that's because today Americans of different beliefs came together again," Obama said late Friday.
On side issues — "riders," the negotiators called them — the Democrats and the White House rebuffed numerous Republican attempts to curtail the reach of the Environmental Protection Agency.
They also sidetracked their demand to deny federal funds to Planned Parenthood. Under the accord, the issue will come to a vote in the Senate under terms guaranteed to end in its defeat.
Anti-abortion lawmakers succeeded in winning a provision to ban the use of federal or local government funds to pay for abortions in the District of Columbia.
The long-term deal in hand, lawmakers raced to pass an interim measure to prevent a shutdown, however brief, and keep the federal machinery running for the next several days. The Senate acted within minutes; the House followed suit shortly after midnight, sending the measure to Obama. White House Budget Director Jacob Lew issued a directive saying that in view of the agreement, "agencies are instructed to continue their normal operations."
Some lawmakers were not satisfied with the deal.
"I voted against this short-term continuing resolution for the same reason I voted against the last one and the one before that — because it does not set us on a path to fixing the spending and debt problems our country is facing," freshman Sen. Rand Paul, R-Ky., said in a statement. "As I have said before, there is not much of a difference between a $1.5 trillion deficit and a $1.6 trillion deficit — both will lead us to a debt crisis that we may not recover from."
The deal came together after six grueling weeks and an outbreak of budget brinksmanship over the past few days as the two sides sought to squeeze every drop of advantage in private talks.
Despite the accomplishment, officials noted it marked only a first step. Republicans intend to pass a 2012 budget through the House next week that calls for sweeping changes in Medicare and Medicaid and would cut domestic programs deeply in an attempt to gain control over soaring deficits.
And the Treasury has told Congress it must vote to raise the debt limit by summer — a request that Republicans hope to use to force Obama to accept long-term deficit-reduction measures.
"We know the whole world is watching us today," Reid said earlier in a day that produced incendiary, campaign style rhetoric as well as intense negotiation.
Reid, Obama and Boehner all agreed a shutdown posed risks to an economy still recovering from the worst recession in decades.
But there were disagreements aplenty among the principal players in an early test of divided government — Obama in the White House, fellow Democrats in control in the Senate and a new, Tea Party-flavored Republican majority in the House.
"Republican leaders in the House have only a few hours left to look in the mirror, snap out of it and realize how positively shameful that would be," Reid said at one point, accusing Republicans of risking a shutdown to pursue a radical social agenda.
For much of the day, Reid and Boehner disagreed about what the disagreement was about.
Reid said there had been an agreement at a White House meeting Thursday night to cut spending by about $38 billion. He said Republicans also were demanding unspecified cuts in health services for lower income women that were unacceptable to Democrats.
"Republicans want to shut down our nation's government because they want to make it harder to get cancer screenings," he said. "They want to throw women under the bus."
Boehner said repeatedly that wasn't the case — it was spending cuts that divided two sides.
"Most of the policy issues have been dealt with, and the big fight is about spending," he said. "When will the White House and when will Senate Democrats get serious about cutting federal spending?"
By midday Friday, 12 hours before the funding would run out, most federal employees had been told whether they had been deemed essential or would be temporarily laid off in the event of a shutdown.
Obama canceled a Friday trip to Indianapolis — and a weekend family visit to Colonial Williamsburg in Virginia — and kept in touch with both Boehner and Reid.
The standoff began several weeks ago, when the new Republican majority in the House passed legislation to cut $61 billion from federal spending and place numerous curbs on the government.
In the weeks since, the two sides have alternately negotiated and taken time out to pass interim measures.
Originally, Republicans wanted to ban federal funds for Planned Parenthood, a health care services provider that is also the nation's largest provider of abortions.
Federal funds may not be used to pay for abortions except in strictly regulated cases, but supporters of the ban said cutting off government funds for the organization — currently about $330 million a year — would make it harder for it to use its own money for the same purpose.
Democrats rejected the proposal in private talks. Officials in both parties said Republicans returned earlier in the week with a proposal to distribute federal funds for family planning and related health services to the states, rather than directly to Planned Parenthood and other organizations.
Democrats said they rejected that proposal, as well, and then refused to agree to allow a separate Senate vote on the issue as part of debate over any compromise bill.
Instead, they launched a sustained campaign at both ends of the Capitol to criticize Republicans.
"We'll not allow them to use women as pawns," said Sen. Patty Murray, a fourth-term lawmaker from Washington who doubles as head of the Democratic senatorial campaign committee.
For Congress and Obama there are even tougher struggles still ahead — over a Republican budget that would remake entire federal programs, and a vote to raise the nation's debt limit.
NBC News contributed to this report from The Associated Press.