WASHINGTON — On Thursday afternoon, staff members at the Farm Bureau, the country’s largest agriculture trade group, were putting the final touches on a news release congratulating House members for passing a farm bill. But as more and more members cast their votes, the trade group realized that the bill was going to go down in defeat.

The failure of the House to pass a new five-year farm bill has blindsided the agriculture industry. The leaders of several trade groups said they had waited nearly three years for a farm bill and had been disappointed as the legislation was held up by partisan politics.

Many farm programs, including direct payments and crop insurance, will remain in place through Sept. 30, thanks to an extension measure passed by Congress to avoid the “fiscal cliff” this year. But several farmers, ranchers and dairy producers said that the failure of the farm bill had left them unable to plan as the planting season approached and that some programs, like disaster assistance for livestock producers, remained unfinanced.

“The biggest thing is that it creates uncertainty, the one thing you can’t have in this business,” said Danny Murphy, a soybean farmer from Canton, Miss., who is the president of the American Soybean Association. “The lack of a farm bill makes it hard for us to get loans or buy equipment because we don’t know what price support programs we are going to be operating under. Banks don’t like that.”