Corn in Chicago once again touched the highest level since 2012 as war in Ukraine chokes supplies and adverse weather threatens crops in the Americas.

The futures pared some of the gains, with traders weighing the latest supply-and-demand signals. U.S. officials have predicted that Russia’s latest moves in Ukraine could portend a bloody and prolonged battle.

Russia’s invasion of its neighbor is hampering exports from the region, leaving Ukraine’s silos bulging with last year’s grain and also hurting crop plantings. Those supply losses are pushing buyers toward other origins, while growers in both North and South America are facing weather challenges. There’s especially sharp focus on Brazilian crops that are just weeks away from harvest and threatened by drought. 

“It’s not good that the second crop corn in Brazil is struggling,” said Naomi Blohm, senior market adviser at Total Farm Marketing in West Bend, Wisconsin. “This is another one of those ‘game changers’ for the global scene.”

Amid the Brazilian weather woes and Black Sea trade disruptions, China is ramping up purchases of U.S. corn. The Asian nation and top importer bought up 1.1 million tons of the American grain, marking the fourth flash sale to China this month of corn exceeding a million tons.

But there are also production concerns in the U.S., where corn crops are just being sown. Wet and chilly soils have left the plantings pace at its slowest start since 2013.

Chicago corn for July delivery rose as much as 0.9% to $8.1975 a bushel Thursday, the highest since August 2012 and nearing an all-time record. The rally, along with surging oilseed prices, risks further raising food costs that have hit a record and are contributing to inflation around the world.

“Corn is entering rarified air to ration demand,” Rabobank said in a report, which raised its outlook for average prices in the second quarter to $8.25 a bushel. “Consumers are shocked by feed ingredient costs, but that’s precisely the point: supplies are in a perilous state, and security comes at a premium.” 

Corn has jumped about 37% in Chicago this year. Wheat futures also rose Thursday while soybeans steadied.

Near-freezing temperatures could linger in the U.S. Midwest through Friday, according to the U.S. Department of Agriculture. There will still be time for farmers to catch up on corn plantings in May once the weather warms.