AMES, Iowa — Tim Recker has been growing corn in this state his whole life, and using his crops to make ethanol almost as long, at first by the jar for his trucks, now by the barrel for the nation. That is in large part because Congress in 2005 mandated that oil refiners blend ethanol into gasoline.

“When I look out my window and see farms that have built and expanded and improved, it’s because of the ethanol mandate,” Mr. Recker said from his farm in Arlington, Iowa. Mr. Recker, a Republican, said his decision at the presidential caucuses on Monday would be driven by what candidates have said about the 2005 law, which created the Renewable Fuel Standard.

But beyond the borders of a state with outsize importance in the selection of presidents, ethanol may be losing its grip on the body politic. Energy policy experts, advocates in the fight on poverty and even other farmers say a law that has been a boon for Iowa has been a boondoggle to the rest of the country. The ethanol mandate has driven up food costs while failing to deliver its promised environmental benefits. Rising domestic oil production and a global energy glut have all but nullified the pitch that ethanol would help wean the country off foreign oil.

And now a powerful coalition including oil companies, environmentalists, grocery manufacturers, livestock farmers and humanitarian advocates is pushing Congress to weaken or repeal the mandate. As soon as this week, the Senate could vote on a measure to roll back the Renewable Fuel Standard, just days after the Iowa caucuses close and the issue largely goes to rest for another four years.

Even here, as Iowa urbanizes and diversifies, ethanol may be losing its once-powerful hold, some political consultants say. Senator Ted Cruz of Texas, one of the Republican front-runners in Iowa, has called for an end to subsidies for all forms of energy, as well as a five-year phasing out of the renewable fuel mandate that created the ethanol economy here.

That position drew an unusual repudiation from Iowa’s governor, Terry E. Branstad, a Republican who has not endorsed any candidate. “It would be a big mistake for Iowa to support him,” Mr. Branstad told reporters at a forum held by the Iowa Renewable Fuels Association.

At the same forum, the other front-runner, Donald J. Trump, said he was “100 percent” behind the ethanol mandate and would even support increasing it further.

“Culturally, anything that supports corn is seen as good,” said Bruce Babcock, an economist at Iowa State University, pondering whether ethanol’s grip here was slipping. “But if Ted Cruz wins the caucus, there’s your answer.”

Beyond presidential politics, the weight of opinion is swinging against ethanol, sometimes virulently.

“No genuine Republican would be in favor of increasing an artificial, demand-creating, crony-capitalism measure like the Renewable Fuel Standard,” said Thomas Elam, the president of FarmEcon, an independent economic consulting firm in Carmel, Ind. “It’s a socialistic, left-wing liberal position. That is so far against fundamental Republican principles of market economics, it shows that Donald Trump will say whatever it takes to get votes in Iowa.”

When the Renewable Fuel Standard was enacted, lawmakers hoped to ease the nation’s dependence on foreign oil while promoting a low-carbon, climate-friendly alternative. It was viewed as such a success that Congress increased the mandate in 2007: The nation’s gasoline refiners must buy and blend an increasing amount of ethanol every year, rising to 36 billion gallons by 2022 from 15 billion now. Only the first 15 billion gallons are supposed to come from corn. The rest of the ethanol is mandated to come from nonfood crops like switch grass, to prevent ethanol from driving up food costs.

But doubts are growing. A number of scientific studies have shown that the environmental benefits of corn ethanol are limited, reducing carbon dioxide only slightly compared with conventional gasoline, partly because a large amount of fuel goes into growing corn, including in fertilizers and farm equipment.

Since the law’s passage, breakthroughs in hydraulic fracturing, or fracking, have led to a boom in domestic oil production. The United States is now exporting oil. But no similar breakthrough in ethanol technology has advanced the industry. Last year, corn ethanol producers easily met the 15-billion-gallon production requirement, but refiners have not been able to make cleaner, noncorn biofuel on a cheap, commercial scale.

“You’ve got a standard that is not able to be met,” said Senator Lisa Murkowski, Republican of Alaska, the chairwoman of the Committee on Energy and Natural Resources. “So you either reform it or get rid of it.”

In Iowa, the mandate has attracted major employers like Dow and DuPont, which produce ethanol. Nearly all of the state’s approximately 40 ethanol refiners use locally grown corn to produce about four billion gallons annually. Since the law’s passage, the price of corn has more than doubled, to an average of $4.11 per bushel in 2014 from an average of $1.96 per bushel in 2005. Between 2011 and 2013, it climbed to $6 per bushel.

“If you live in Iowa in a nice house, and send your kids to good schools, it’s because of ethanol,” said Eric Hakmiller, the president of Lincolnway Energy, an ethanol plant in Nevada, Iowa.

But high corn prices have raised the cost of livestock feed, and in turn have made meat and dairy more expensive for consumers.

“It’s a tax on people who eat food,” said Todd Simmons, the chairman of the National Chicken Council and the chief executive of Simmons Foods, a poultry producer in Siloam Springs, Ark.

A 2013 report by FarmEcon, Mr. Elam’s consulting firm, said that in the eight years since the passage of the Renewable Fuel Standard, the average annual cost of groceries for a family of four had grown by about $2,000.

“Mandates for food-based biofuels like corn ethanol increase hunger,” said Kelly Stone, a policy analyst with ActionAid USA, a nonprofit advocacy group working to end poverty.

An already subsidized farm economy has found another subsidy. The Environmental Working Group, a Washington advocacy organization, says Iowa corn farmers received $15 billion in federal farm subsidies between 1995 and 2012.

“The ethanol mandate is obsolete,” said Scott Faber, the group’s vice president of government affairs. “It’s the toothpick on the subsidy club sandwich.”

Iowa has become less dependent on ethanol, and voters who are not directly dependent on ethanol appear to be less concerned about the fate of the mandate.

“It’s created a lot of jobs,” Michael Johnston, a truck driver and an independent, said over a beer at Dottie’s Landmark Bar and Grill in Polk City, discussing his caucus vote. “I like it the way it is. But ethanol wouldn’t be the deciding factor. It’s only one part of the economy. I care about taxes, national security.”

At a Pizza Ranch outside Ames, Kathleen Johns, a retired factory worker and a Republican, said was her biggest concern, not ethanol. “I know about it, but I’m not worried about it too much,” she said.