Despite a stumble near the finish line, key leaders in the U.S. Congress announced that an agreement on a new US$789 billion stimulus bill has been finalized.

After Senate Majority Leader Harry Reid held a press conference Wednesday afternoon to announce a deal being cut, word trickled out that House Speaker Nancy Pelosi and some House Democrats were not happy with the accord.

But after an early evening meeting with negotiators, Pelosi announced her support for the deal saying, "We have come to an agreement with the Senate."

Bearing no other last-minute hiccups, it appears the bill now has the support needed to move to the White House, for President Barack Obama's signature.

Obama, who has been lobbying hard for the legislation, says the bill will save or create 3.5 million jobs.

The new deal puts the stimulus bill at less than the cost of either the House or Senate versions of the legislation.

"The bills were really quite similar, and I'm please to announce that we've been able to bridge those differences," Reid said at a press conference Wednesday.

"Like any negotiation, this involved give and take, and if you don't mind my saying so, that's an understatement."

The deal puts the bill on track for Obama's time table, as he hoped to sign it into law by next Monday.

It is not known when final votes in Congress will be. A House vote could still happen Thursday morning and a Senate vote would follow shortly afterwards, as lawmakers have a weeklong vacation planned for next week.

The bill puts an emphasis on those hit hardest by the recession with measures for expanded unemployment benefits, food stamps and health coverage. There is also billions for states that are cash-strapped and face cutting their own programs.

The legislation also keeps Obama's signature tax cut for millions of lower and middle-income Americans.

Other key initiatives for Obama, such as information technology improvements for health care and money for "green" jobs and reducing reliance on foreign oil, are also part of the bill.

Sen. Joseph Lieberman, the Connecticut independent who supported Sen. John McCain in the 2008 presidential election, predicted the bill "will be the beginning of the turnaround for the American economy."

Obama stressed the importance of the bill by saying that executives at Caterpillar Corp. told him that if the stimulus package was passed they would repeal some of the 22,000 employees they were planning to lay off.

Only three out of 219 Republicans in Congress supported the legislation in the first round of votes; Sens. Susan Collins and Olympia Snowe of Maine, and Sen. Arlen Specter of Pennsylvania.

"Today we have shown that, working together, we can address the enormous economic crisis facing our country," Collins said Wednesday.

Many Republicans are still set in firm opposition against the bill, despite the changes.

"It appears that Democrats have made a bad bill worse by reducing the tax relief for working families in order to pay for more wasteful government spending," Rep. John Boehner of Ohio.

Wall Street welcomed the move with cautious optimism. The Dow Jones industrials, which dropped 382 points on Tuesday, gained 51 points Wednesday.

With files from The Associated Press