It wasn't pretty -- a White House spokesman likened it to sausage making -- but all the public debate and backroom negotiations among lawmakers has led to an expected vote on the economic stimulus bill Monday.
But the process isn't over yet.
Even though Democrats control the Senate with a 58-vote majority bolstered by the elections, they still need 60 votes to shut down debate from Republicans and advance the bill to a final vote on Tuesday, as President Obama is urging them to do. And even if the Senate passes the bill, the Senate and House negotiators will have to work out differences between the bills approved by the two bodies.
Officials put the cost of the Senate package at $827 billion, which combines massive spending, tax cuts and incentives that both the administration and the majority in Congress hope will stimulate the economy into recovery.
Critics have mockingly referred to the plan as a "spendulus" bill, saying it spends too much money on programs that won't stimulate the economy.
The bill includes the president's tax cut of up to $1,000 for working couples -- even if they earn too little to pay income taxes, though the White House has noted that low-income families also pay withholding taxes for Social Security and Medicare. Also included in the Senate bill are tax breaks for homebuyers and people buying new cars. Much of the new spending would be for victims of the recession, in the form of unemployment compensation, health care and food stamps.
After the final vote, lawmakers from both chambers will try to reconcile the two versions of the bills for a final package to be sent to the president.
"As a result of the Senate action, we are closer to moving to a conference committee that will finalize legislation President Obama will sign," House Speaker Nancy Pelosi said in a written statement Friday night. "Despite differences between the House and Senate versions, Congress is committed to sending the president legislation to create or save over 3 million jobs and begin to put our country back on the road to recovery."
But it may not be that simple.
Among the biggest areas of divergence in the two bills are health care, education and energy.
The Senate bill offers $21 billion to subsidize health care insurance for the unemployed under the COBRA program, compared with $40 billion in the House bill. The House bill also provides $4 billion for preventive care, $1.5 billion for community health centers, $420 million to combat avian flu and $335 million for programs that combat AIDS, sexually transmitted diseases and tuberculosis.
The Senate bill sets aside about $40 billion for energy programs, focused chiefly on efficiency and renewable energy. The House bill only offers $28.4 billion.
And the House bill provides $36 billion to finance locally issued bonds for school construction, teacher training, economic development and infrastructure improvements, while the Senate bill offers only $22.8 billion.
In a key reduction from the bill that reached the Senate floor earlier in the week, $40 billion would be cut from a "fiscal stabilization fund" for state governments, though $14 billion to boost the maximum for college Pell Grants by $400 to $5,250 would be preserved, as would aid to local school districts for the No Child Left Behind law and special education.
A plan to help the unemployed purchase health insurance would be reduced to a 50 percent subsidy instead of two-thirds.
Republican leaders aren't pleased with the package, saying many of the provisions won't create jobs.
But Democratic leaders expressed confidence that the concessions they've made will trim the bill enough for it to win passage.
"It represents an effective, targeted approach to the economic crisis facing our country," Collins said Friday. "And even more important, it demonstrates to the American people that at a time of crisis we can work together."
FOX News' Trish Turner and the Associated Press contributed to this report.