WASHINGTON — A last-minute budget deal forged amid bluster and tough bargaining averted an embarrassing federal shutdown, cut billions in spending and provided the first major test of the divided government that voters ushered in five months ago.
Working late into Friday night, congressional and White House negotiators finally agreed on a plan to pay for government operations through the end of September while trimming $38.5 billion in spending.
Lawmakers then approved a measure to keep the government running for a few more days while the details of the new spending plan are written into legislation.
Actual approval of the deal is expected in the middle of next week.
"Americans of different beliefs came together again," President Barack Obama said from the White House Blue Room, a setting chosen to offer a clear view of the Washington Monument over his right shoulder.
The agreement was negotiated by Obama, House Speaker John Boehner, R-Ohio, and Senate Majority Leader Harry Reid, D-Nev. The administration was poised to shutter federal services, from national parks to tax-season help centers, and to send furlough notices to hundreds of thousands of federal workers.
All sides insisted they wanted to avoid that outcome, which at times seemed inevitable.
Shortly after midnight, White House budget director Jacob Lew issued a memo instructing departments and agencies to continue normal operations.
Boehner said the deal came after "a lot of discussion and a long fight." He won an ovation from his rank and file, including the new tea party adherents whose victories last November shifted control of the House to the GOP.
Reid declared the deal "historic."
The deal marked the end of a three-way clash of wills. It also set the tone for coming confrontations over raising the government's borrowing limit, the spending plan for the budget year that begins Oct. 1 and long-term deficit reduction.
In the end, all sides claimed victory.
For Republicans, it was the sheer size of the spending cuts. For Obama and Reid, it was casting aside GOP policy initiatives that would have blocked environmental rules and changed a program that provides family planning services.
Not all policy provisions were struck.
One in the final deal would ban the use of federal or local government funds to pay for abortions in the District of Columbia. A program dear to Boehner that lets District of Columbia students use federally funded vouchers to attend private schools also survived.
Republicans had included language to deny federal money to put in place Obama's year-old health care law. The deal only requires such a proposal to be voted on by the Democratic-controlled Senate, where it is certain to fall short of the necessary 60 votes.
The deal came together after six grueling weeks as negotiators virtually dared each other to shut down the government.
Boehner faced pressure from his GOP colleagues to stick as closely possible to the $61 billion in cuts and the conservative policy positions that the House had passed.
At one point, Democrats announced negotiators had locked into a spending cut figure — $33 billion. Boehner pushed back and said there was no deal. During a meeting at the White House this past week, Boehner said he wanted $40 billion. The final number fell just short of that.
In one dramatic moment, Obama called Boehner on Friday morning after learning that the outline of a deal they had reached with Reid in the Oval Office the night before was not reflected in the pre-dawn staff negotiations. The whole package was in peril.
According to a senior administration official, Obama told Boehner that they were the two most consequential leaders and if they had any hope of keeping the government open, their bargain had to be honored and could not be altered by staff. The official described the scene on condition of anonymity to reveal behind-the-scenes negotiations.
The accomplishment set the stage for even tougher confrontations.
House Republicans intend to pass a 2012 budget in the coming week that calls for sweeping changes in the Medicare and Medicaid health programs and even deeper cuts in domestic programs to gain control over soaring deficits.
In the Republican radio address, House Budget Committee Chairman Paul Ryan, R-Wis., warned of a coming crisis.
"Unless we act soon, government spending on health and retirement programs will crowd out spending on everything else, including national security. It will literally take every cent of every federal tax dollar just to pay for these programs," Ryan said Saturday.
That debate could come soon.
The Treasury has told Congress it must vote to raise the debt limit by summer. Republicans hope to use this issue to force Obama to accept long-term deficit-reduction measures.
____9 comments on this story
Associated Press writers David Espo, Andrew Taylor, Erica Werner, Julie Pace and Ben Feller contributed to this story.
Obama weekly address: www.whitehouse.gov
GOP address: www.youtube.com/republicanconference