Few states are as identified with farming as Kansas. Among its nicknames are the “The Wheat State” and “American’s Bread Basket.” And Kansas’s lawmakers are quick to point out the importance of agriculture to the state’s economy.

But when a new five-year farm bill, which authorizes nearly $1 trillion in spending on farm and nutrition programs, came up for a vote in the House of Representatives on Wednesday, the entire Kansas congressional delegation voted against it.

It was the first time that all members of the state’s delegation has voted against a farm bill, according to a review of congressional votes by The New York Times dating from the 1950s.

For many farmers in Kansas, which is heavily dependent on agriculture — it ranks seventh in farm production — the vote was a surprise.

‘We were really disappointed that they didn’t vote with us,” said Steve Baccus, president of the Kansas Farm Bureau, which represents the state’s farmers. “There were lots of things that we didn’t like in the bill, but after suffering through the worst drought in 50 years in 2012 and with the 2008 farm bill expired, we supported getting something done.”

Mr. Baccus, a fourth-generation farmer from Minneapolis, Kan., who grows wheat, corn and soybeans, said his group tried to lobby the state’s congressional delegation in support of the bill, even if they were opposed to some of the provisions contained in it.

“We felt like this was the best shot of getting something passed in this political environment,” he said. “But I guess for many of them the cons outweighed the pros.”

In statements issued after the farm bill vote, members of the Kansas delegation, all Republicans, said that they supported farming and realized the importance of agriculture to the state, but that they could not get past the bill’s flaws.

For Representative Tim Huelskamp, a fifth-generation farmer who represents the state’s First Congressional District, which is top in the nation for agriculture products sold, it was spending on the food stamp program that was first on his lists of concerns.

“This program is in desperate need of reform, and yet this bill makes only nominal changes,” he said. “Instead of status quo in this, the fastest-growing welfare program in the entire government, we should have taken the opportunity to provide meaningful work reform requirements, especially for able-bodied adults, as we passed in the U.S. House.”

Representative Lynn Jenkins, who represents the Second District, said she voted against the bill because it cost too much and failed to achieve regulatory reform for farmers.

One of her main concerns: a new $20 million catfish inspection office at the Agriculture Department that has been the source of criticism by a number of lawmakers because it duplicates a cheaper existing inspection office at the Food and Drug Administration. Critics said the office, created in the 2008 farm bill at the request of Southern lawmakers from catfish-producing states, was created to keep out catfish from countries such as Vietnam, a potential violation of international trade laws.

Representative Mike Pompeo, from the state’s Fourth District, said his no vote was a result of his opposition to provisions in the new farm bill that would create trade and regulatory burdens for the state’s livestock producers. Meat and poultry producers are opposed to language that requires retailers to list the country of origin of meat.

“Last year I voted in favor of a farm bill that was not perfect, but a step forward,” Mr. Pompeo said. “Voting against this bill was not a easy decision, but I believe it reflects a step backwards to the old Washington of pet projects, reckless spending and harmful regulation.”

Representative Kevin Yoder, from the Third District, did not say why he opposed the bill.

In the end, the Kansas delegation vote did little to affect the outcome of the farm bill’s passage. It passed comfortably, 251 to 166.

Mr. Baccus said farmers held no ill will toward the delegation.

“It was a difference of opinion on this one piece of legislation,” he said. “We will still work with them to promote the interest of the state’s farmers.”