An agreement to end the partial government shutdown and avoid a possible U.S. default easily passed the Senate and headed to the House for a vote expected later Wednesday, CNN reported.
If approved by the Republican-led House, the legislation would go to President Barack Obama to be signed into law by the end of Thursday - the deadline for increasing the federal borrowing limit or risk the first default in American history.
"I will sign it immediately," Obama said after the Senate vote on Wednesday night, adding that "we'll begin reopening our government immediately."
Such quick congressional action on a measure announced earlier in the day was in stark contrast to the protracted brinksmanship of recent weeks that led to the shutdown now in its 16th day and brought the threat of default.
The agreement represented a victory for Obama and Democrats over conservative Republicans, who had tried to use the shutdown and debt ceiling deadline to wring concessions on spending cuts and dismantling the Obama's signature health care reforms.
However, the final deal worked out by Senate leaders after House Speaker John Boehner was unable to get his own Republican caucus to support a House GOP version lacked any substantive measures sought by the political right beyond extending current spending levels until January 15.
It also raised the federal borrowing limit until February 7 and set up budget negotiations between the House and Senate intended to come up with a broader spending plan for the rest of fiscal year 2014, which ends on September 30.
Another provision requiring the government to confirm the eligibility of people receiving federal subsidies under Obamacare was labeled by Democrats and the White House as minor.
"We fought the good fight; we just didn't win," Boehner told a radio station in his home state of Ohio.
In the 81 to 18 Senate vote, more than half of the chamber's Republicans joined Democrats in support.
Both chambers had to take special steps to get the legislation passed quickly, raising concerns that tea party conservatives led by Sen. Ted Cruz of Texas would block or delay it in a final effort to include provisions intended to harm Obama's signature health care reforms.
Just before the vote, Cruz called the compromise terrible but did not mount a filibuster or employ other procedural moves in opposition.
He had earlier criticized his Senate colleagues for what he called their failure to listen to the American people and said the fight against Obamacare would continue.
Democratic Sen. Chuck Schumer of New York blasted Cruz and the rest of the tea party wing in Congress for what he called the "reckless, irresponsible politics of brinksmanship over the last few weeks."
"It was not America's finest moment," Schumer said.
In a brief statement before the expected House vote, Obama said politicians in Washington have to "get out of the habit of governing by crisis."
"Hopefully, next time, it will not be in the 11th hour," Obama told reporters Wednesday night, calling for both parties to work together on a budget, immigration reform and other issues.
National polls conducted since the start of the shutdown on October 1 indicate public anger with all sides over the partisan political impasse, with Republicans getting blamed more than Democrats or Obama.