The House and Senate have reached an agreement to reconcile their two versions of a massive economic recovery package, settling on a bill with $789 billion in spending and tax cuts.

Negotiators signed the bill Wednesday night, setting up a final vote in both chambers of Congress as soon as this week.

Senate Majority Leader Harry Reid said the compromise bill will create 3.5 million jobs, and tax cuts will make up more than a third of the package. 

"This has been a give and take," Reid said. After nearly 24 hours of negotiations, he said, the House and Senate were able to bridge the differences between the conflicting versions of the bill and arrive at a package that costs less than either of them. 

The Senate passed a version costing $838 billion Tuesday that included more tax cuts than the $819 billion version passed two weeks ago by the House.

President Obama thanked lawmakers for coming together around a "hard-fought compromise that will save or create more than 3.5 million jobs and get our economy back on track."

"I'm grateful to the House Democrats for starting this process, and for members in the House and Senate for moving it along with the urgency that this moment demands," he said in a statement.

But some House Democrats were not happy with the compromise bill.

"They said that there was a deal that didn't exist," said Rep. Jose Serrano, D-N.Y.

Lawmakers expressed concern about how Senate negotiators insisted on stripping money to construct new schools. And members of the Congressional Black Caucus seemed particularly upset about funding for the Neighborhood Stabilization fund, which lost $4.2 billion in the Senate version of the bill.

Despite Democratic concern about the bill, the House moved ahead with a plan to bring the measure to the floor as early as Thursday. 

The economic stimulus package, pushed by President Obama, had scant GOP support, but Reid thanked the three Republican senators who helped forge a compromise with Democrats. 

One of those Republicans, Sen. Arlen Specter of Pennsylvania, said he would have preferred a bill similar to what Sen. John McCain, R-Ariz., had proposed -- a tax-cut measure costing about half as much as the compromise. 

"But in the legislature you don't always get what you want," Specter said. He said action must be taken, "because the serious economic conditions, with millions of jobs lost and millions of people being foreclosed from their homes, poses a threat that cannot be ignored." 

Connecticut Sen. Joe Lieberman also thanked the Republicans, saying the recovery package would go a long way in jump-starting the economy. 

"This, in my opinion, is a turning point," he said. 

The bill includes help for victims of the recession in the form of unemployment benefits, food stamps, health coverage and more, as well as billions for states that face the prospect of making deep cuts in their own programs. 

It also preserves Obama's signature tax cut -- a break for millions of lower and middle income taxpayers, including those who don't earn enough to pay income taxes. 

House Speaker Nancy Pelosi was conspicuously absent from the news conference in which members of the Senate announced the agreement, and it was not clear whether she stayed away out of unhappiness or a scheduling conflict. 

Officials had said previously that one of the final issues to be settled was money for school modernization, a priority of Pelosi as well as Obama and one on which they differed with Republican Sen. Susan Collins, Maine, and other moderates whose votes will be essential for final Senate approval. 

It was not immediately clear when final votes in the two houses would occur. A House vote was possible as early as Thursday, with the Senate to follow before lawmakers begin a scheduled weeklong vacation. 

There was no immediate reaction from the White House, but the president's chief of staff and other aides were intimately involved in the negotiations that led to the agreement. 

The Associated Press contributed to this report.