It was supposed to be a $37 billion bill to fund the wars in Afghanistan and Iraq.

But after years of crafting emergency spending bills for war, the appetite for additional military dollars grew thin among liberal Democrats in the House of Representatives. In fact, so thin that the only way to pass the legislation would be to pile on $20 billion in domestic spending and offer opponents of the conflicts three separate votes to either slash money for the war, order a withdrawal or require the president submit a timetable to pull out of Afghanistan.

To find out how much this bill is going to cost you, go to Fox News' Taxpayer Calculator.

None of the anti-war amendments came close to passing in the House. They were mainly designed to give war opponents on both the right and left a chance to weigh in on conflicts they feel have lasted too long.

So that contorted the legislation into a milieu of domestic spending advocated by many Democrats.

The marquee items in the measure included $10 billion in aid to states to help avoid teacher layoffs and $5 billion for collegiate Pell Grants. The package also provided $142 million to help clean up the oil spill in the Gulf of Mexico and $1 billion to assist youths find summer work. There is $1.15 in the package to compensate black farmers who argue the Department of Agriculture discriminated against them for years when it came to doling out loans. Even though the government settled a lawsuit with black farmers more than a decade ago, many missed the deadline to file claims. The money in this legislation is designed to help those who filed late.

The Senate approved its version of the legislation in May and President Obama wanted to sign the bill by July 4. But the House’s add-ons means the legislation must return to the Senate. The House and Senate must synch-up bills so that both have approved the same measure before it can be sent to the president for his signature.

Sen. Thad Cochran (R-MS), the leading Republican on the Senate Appropriations Committee, says additional provisions tacked-on by the House probably won’t pass muster in the Senate. Many Republicans want a “clean” war bill, stripped of extras. But House leaders say an impasse over military spending blocked them from doing just that. Thus, attaching the extra spending was the only way they could convince their rank-and-file to pass any sort of war legislation.

Even though the House bill significantly bumped up the cost of the war bill, a coalition of 13 senators took issues with some $800 million in cuts to education programs. The House bill sliced the Teacher Initiative Fund and $5 billion to “Race to the Top,” a program that gives states money to create charter schools.

“The proposed education cuts are unacceptable,” the senators wrote in a letter to Senate Appropriations Committee Chairman Daniel Inouye (D-HI). “Choosing between preserving teacher jobs and supporting vital education reforms is a false choice.’

President Obama threatened to veto the bill after the House slashed his education initiatives. Mr. Obama also warned the House not to bind him as commander in chief to fight the war in Afghanistan as he saw fit.