President Obama has threatened to veto the war funding bill that passed the House on Thursday night. The president's beef is with a provision to prevent teacher layoffs, which Democrats tacked onto the bill along with several other domestic priorities. To pay for the measure, the House agreed to cut money from some of the president's key education reform initiatives. Obama isn't happy about it. Nor should he be.

Here's the back story: Thanks to severe cuts in state budgets, between 100,000 and 300,000 teachers could lose their jobs this year. Back in late spring, there was hope that Congress would pass “edujobs,” a $23 billion bill to save these teachers from pink slips. But, after Republicans and some conservative Democrats decried it as a "bailout" that would swell the federal deficit, the bill died in the Senate in May. The House then revived it, adding it as an amendment to the war funding legislation. But the final version, which passed last night, allocates a lot less spending—just $10 billion—and takes some of the money from funds the Department of Education received in last year's stimulus package.

Laying off teachers can have consequences—and not just for the teachers. It can mean bigger class sizes, understaffed academic departments, and—all else being equal—worse education. So the argument for spending money to avoid layoffs is, in principle, strong.

But this particular measure has evolved in some decidedly unappealing ways. When it was first introduced, numerous education advocacy groups asked Congress to impose constraints that would effectively compel states to reform their layoff systems. As I explained recently, most states and school districts follow a misguided "last-hired, first-fired" rule. If they must let teachers go for budgetary reasons, they start by booting those teachers who have spent the least time in the classroom. Teacher quality doesn't factor into the decision at all. Congress, though, refused to go along with the proposal—and the Obama administration didn't intervene. "Right now, the most important thing is to stop the bleeding," Senator Tom Harkin, chair of the Health, Education, Labor, and Pensions Committee, said in early May. 

 That was bad enough. But then, this week, House Appropriations Chairman David Obey proposed that the government pay for the legislation, in part, by taking money from other Education Department funds—and not just any old funds, but the money set aside for some of Obama’s most important school reforms. Under Obey's plan, which the full House ultimately adopted, $500 million would come from Race to the Top, a competitive grant program and probably the most talked-about aspect of Obama's education agenda; $200 million would come from the Teacher Incentive Fund, which supports performance-based compensation plans; and another $100 million would come from money for charter schools. Sounding a bit like Harkin, Obey reportedly said, "When a ship is sinking, you don't worry about redesigning a room, you worry about keeping it afloat."

The politics here are no mystery. Teachers' unions want to avoid layoffs, but they're also wary of Obama’s more aggressive reforms. They'd choose saving members' jobs over, say, Race to the Top—and they're among congressional Democrats' biggest contributors. According to the Center for Responsive Politics, more than 95 percent of the unions' campaign funds go to Democrats. (Obey ranks third in Congress for total money received between 1990 and 2010, although he isn't running for reelection this year.) Unsurprisingly, unions aren't bemoaning the potential loss of Department of Education funds. "It's deeply disappointing that a Democratic administration would threaten to veto a jobs bill because paying for it would require a negligible cut from its new pet programs," Randi Weingarten, president of the American Federation of Teachers, said in a statement.

Republicans, in turn, are pouncing on the new funding scheme in order to again try and discredit the whole idea of spending more federal dollars on schools in the first place: Democrats are "jumping at the chance to discard education reform to salvage an unpopular bailout for the education establishment,” Republican Representative John Kline said in a statement on Wednesday.

That brings us to Obama’s veto threat. The war funding bill has to go back to the Senate, which passed a smaller version of it in May. Senators might find a way to keep the education reform programs fully intact and come up with alternative funding for the jobs measure. Already, thirteen Democratic senators have sent a letter to the Senate Appropriations Committee demanding a new plan. "Choosing between preserving teacher jobs and supporting vital education reforms is a false choice and would set a dangerous precedent," the letter says. "By reducing promised funding for these important reforms, Congress would be pulling the rug out from under the efforts of thousands of communities around the country working to improve their schools."

And if the push for other funding fails? The administration will have a tough choice to make. But one thing's for sure: Letting Congress chip away at the education reform agenda now would place it on a slippery slope in the future. And that's something the country can ill afford.