CHICAGO (Reuters) - Republican U.S. senators are working with some of the world’s biggest agricultural merchants to undo a last-minute provision in the tax overhaul that threatens to distort the grains market and starve private firms of corn, soy and wheat supplies.

A stalk of soft red winter wheat is seen against the setting sun in Dixon, Illinois, July 16, 2013. REUTERS/Jim Young

It was included during final revisions of the tax bill that passed the Republican-controlled Congress last month. The restructuring of the tax code, the biggest in 30 years, handed President Donald Trump his first major legislative victory since taking office.

The provision gives farmers a 20 percent deduction on payments for sales of crops to farmer-owned cooperatives, but not for sales to private or investor-owned grains handlers such as global firm Archer Daniels Midland Co.

The modification was introduced to compensate co-ops and their farmer owners when Congress eliminated a part of the tax code, known as Section 199, which had benefited them for more than a decade.

Republican Senators John Hoeven of North Dakota and John Thune of South Dakota are among the lawmakers whose offices said their attempt to create an equivalent to the old tax code had backfired by incentivizing sales to co-ops at the expense of others in the market.

“Sen. Thune is now aware of the unintended situation this new provision could create in the agriculture industry,” his spokesman Ryan Wrasse said in a statement. He added that Thune believes tax laws should not sway where farmers sell their harvests.

The government wants to correct the disparity, and the U.S. Department of Agriculture said on Friday it expects a solution to be forthcoming.

“The federal tax code should not pick winners and losers in the marketplace,” Greg Ibach, an undersecretary at the USDA, said in a separate statement.

ADM and Cargill Inc [CARG.UL], two of the world’s top agricultural traders, joined talks with Hoeven, Senate aides, and trade associations that represent co-ops and private firms to come up with a way to even the playing field. Representatives of grain companies and lawmakers met in Washington twice this week in a sign of the urgency of the matter.

If legislators do not address the provision by the autumn harvest, private grain companies could lose out on deals to buy billions of bushels of corn and soybeans. Farmers already are looking at how they can transfer grain stored at private elevators to co-ops to take advantage of the new law.

“It’s a massive issue for people like us, ADM, Cargill, all the private ethanol buyers and on and on and on,” said Dale Beyer, chief financial officer for Minn-Kota Ag Products, a private grain handler in Minnesota.

Thune and Hoeven began hearing in early January that the provision would influence where farmers sell their products, according to the National Grain and Feed Association, a trade group that has met repeatedly with the lawmakers’ aides this month to discuss the issue.

The association told members in an email that it learned of the provision in late December, after it was included in the final version of the tax law, and immediately asked tax experts for advice. The group then met with Thune and Hoeven staffers to learn why the senators included it in the law.

The association, in a separate statement with the National Council of Farmer Cooperatives, said it was working with Hoeven, Thune and Senator Pat Roberts of Kansas, also a Republican, to reach “an equitable solution” that preserves benefits formerly available to co-ops under Section 199.

“It’s disappointing to learn a provision in the tax reform bill is distorting the grain markets,” Roberts said in a statement. “The authors of the measure did not intend that outcome.”

TENSIONS RISE

The grain sector is struggling with low crop prices following years of big harvests and is paying close attention to the tax law after support from rural communities helped propel Trump into office in 2016.

On Monday, the president said farmers would score big from the overhaul.

“It’s a total of $5.5 trillion in tax cuts, with most of those benefits going to working families, small businesses, and who? The family farmer,” Trump said in a speech to the American Farm Bureau’s annual convention in Tennessee.

Farmers generally decide to whom they want to sell their grain based on the prices offered by different handlers, how close they live to delivery sites and personal affiliations.

However, the wording of the new provision wrongly assumes that all farmers deliver their grain to co-ops, said Bob Zelenka, executive director of the Minnesota Grain and Feed Association, a trade group that represents co-ops and private companies.

“It tells me that someone who wrote this is unused to how things work in the ag industry,” he said.

Efforts to adjust the provision have some co-ops pushing back out of concerns farmers could lose tax benefits.

Chris Pearson, chief executive of the South Dakota Wheat Growers co-op, said on Twitter on Wednesday that the law “gives farmers some nice tax advantages when doing business with the ORGANIZATION THEY OWN!”

Pearson did not respond to calls and emails seeking comment.

“I would hate to see private companies raise our farmers’ taxes!” he tweeted on his account @CEOWheatGrowers.