The collapse of a farm bill viewed as a “sure thing” in the House yesterday is an example of the glaring dysfunction in Congress.

It also portends more turbulence for some weighty issues that are looming ahead, including immigration, spending limits and preventing a government shutdown.

If Congress can’t save itself from its own partisan, self-destructive impulses, the American people are in for a rough ride ahead.

The House bill was supposed to pass by wide margins with bipartisan support. It would have cut projected spending in farm and nutrition programs by nearly $40 billion over the next 10 years. Half of that or roughly $20.5 billion, would have come from cuts to the food stamp program known as the Supplemental Nutrition Assistance program.

It was these cuts and other farm policy reforms that positioned the bill for what should have been smooth sailing. A bipartisan coalition of legislators from both rural and urban districts, including our own Rep. Blaine Luetkemeyer, had lined up behind it.

Compromises had been made and a deal had been cut. That is the way it has been for decades with the farm bill.

But a flurry of last-minute amendments from conservative Republicans that included everything from drug testing and work requirements for recipients to creating a “food-stamp registry” eventually torpedoed the broader bill.

Predictably, a rash of finger-pointing broke out from both sides of the aisle. Rep. Eric Cantor, Republican of Virginia, the House majority leader, blamed Democrats saying they had “undone years and years of bipartisan work and made it partisan.”

Democratic Rep. Steny H. Hoyer of Maryland levied an almost identical charge against Republicans saying “you took a bipartisan bill and turned it into a partisan bill. It’s unfortunate for farmers, for consumers and our country.”

We agree with the last line.

To be sure, the bill was massive, complex and expensive — coming in at almost a trillion dollars over 10 years. That massive sum of money, even with the reforms and cost reductions, made it a target for some conservatives who are fixated on cutting spending and reducing the size and scope of government.

But the bill was also viewed by some lawmakers opposed to current federal farm policy as too much of a giveaway to farmers who are now making money and prospering in a better economy.

Regardless, the bill’s surprising defeat signals there is no more safe bets anymore in an increasingly fractured and divisive Congress.