House Speaker John Boehner informed the GOP rank and file of the accord, reached in grueling negotiations over several weeks, an official said.
"We have an agreement," concurred a spokesman for Senate Majority Leader Harry Reid, Jon Summers.
Because drafting and then passing the broader legislation could take days, congressional leaders raced to approve a stopgap measure to prevent the onset of the first shutdown in 15 years, due to begin at midnight. Officials said it would keep the government in funds through the middle of next week.
Boehner told reporters just before 11 p.m. EDT (5 p.m. Hawaii time) that the House would continue working.
Republicans said the deal called for $39 billion in spending cuts, a measure that one official said Boehner told his rank and file marked the "largest real-dollar spending cut in American history."
Over a decade, the agreement would cut more than $500 billion from the federal budget, Boehner added, according to a participant in the meeting.
The agreement marked an extraordinary reach across party lines and the first test of a new era of divided government that includes Obama in the White House, control of the Senate by fellow Democrats and a tea party-flavored Republican majority in the House.
Tonight’s developments unfolded as the administration readied hundreds of thousands of furlough notices for government workers and warned that federal services from national parks to tax-season help centers would be shuttered without a deal by midnight.
"We know the whole world is watching us today," said Reid, D-Nev., during a day that featured incendiary, campaign style rhetoric as well as intense negotiation.
Boehner drew strong applause as he walked into a private meeting with the newly empowered GOP House majority to tell them about the deal.
Republicans had pushed for dozens of non-spending measures favored by conservatives, but it seemed likely most of them would be jettisoned.
Earlier in the evening, Boehner indicated his own optimism about a deal, telling reporters, "I was born with a glass half full."
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.
Hours later, Sen. Dick Durbin, D-Ill., said on the Senate floor Republicans had abandoned a demand to remake a federal program that provides family planning services and women’s health care in a way that could jeopardize funding for Planned Parenthood.
The proposal drew withering criticism from Democrats during the day, and unexpectedly, several conservative Republican senators urged their counterparts in the House not to shut the government down over the issue.
Republicans and Democrats alike said the GOP appeared to be abandoning a demand to block numerous Environmental Protection Agency regulations on polluters. A federal study of the likely economic impact of the agency’s rules was one possible alternative under discussion, they added.
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.
The military, mail carriers, air traffic controllers and border security guards would still be expected at work, although paychecks could be delayed.
National parks and forests would close, and taxpayers filing paper returns would not receive refunds during a shutdown.
Passports would be available in cases of emergencies only.
Obama canceled a scheduled Friday trip to Indianapolis — and a weekend family visit to Colonial Williamsburg in Virginia — and kept in touch with both Boehner and Reid.