Corn extended its rally to the highest since 2012 in Chicago as the war in Ukraine chokes supplies and adverse weather threatens crops in the Americas.

Russia’s invasion of its neighbor is hampering exports from there, 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.

In major grower and shipper Brazil, the center-west region has had a dry April, hampering corn in its final development stages before harvest. In the U.S., where crops are just being sown, wet and chilly soils has left the plantings pace at its slowest start since 2013.

The production concerns pushed Chicago futures up as much as 0.9% to $8.1975 a bushel on Thursday, approaching a record set a decade ago. The rally, along with surging oilseed prices, risks further raising food costs that have hit a record and are contributing to red-hot 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 38% in Chicago this year. Wheat futures also rose on Thursday, climbing back above $11 a bushel, 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.

Agricultural markets have also been upended this week as top vegetable-oil shipper Indonesia enacted a sweeping ban on palm oil exports, further stretching global supplies. That makes it vital that farmers in big oilseed regions like North America produce bumper crops this year. The U.S. is already seeing robust demand for future harvests, notably from China.

Soybean oil fell 0.9% in Chicago, though remains near a record high. Indonesia’s palm oil board expects the restrictions to be lifted in May.

As crop futures stay high, fears are mounting about food insecurity in developing nations. The U.S. on Wednesday said it is drawing on emergency funding powers not used since 2014 as part of efforts to provide $670 million in food aid to nations at dire risk of hunger because of Russia’s invasion of Ukraine.