Corn futures capped Friday with their longest weekly rally since May as war in Ukraine sidelines supplies and leaves buyers turning elsewhere for grain.

The U.S. reported net corn export sales of 2.2 million tons in the week to March 3, topping analyst expectations, government data showed Thursday. Ukraine is a major corn shipper and its ports have been shuttered since Russia invaded. The country still had about 16 million tons left to export this season—about half the total expected before war erupted—and questions remain over how much of that can ultimately make it to market.

Dry conditions have also hampered some fields in South America, although agencies in Brazil and Argentina kept their harvest estimates steady this week. Farmers in the Northern Hemisphere will begin planting their next crops soon, and it’s unclear how much Ukraine can sow.

“Strong export sales and continued concerns with a smaller crop from South America helped to support” prices, the Hightower Report said in a note.

Chicago wheat ended the week down 8.4%, the biggest drop since 2014, after soaring to an all-time high Tuesday on concern that the invasion of Ukraine will trigger severe global grain shortages.

The Black Sea region accounts for a quarter of the world’s supply of wheat, one fifth of corn and the bulk of sunflower oil. The most-active wheat futures have pulled back amid questions on whether the trade disruption will translate into higher demand for U.S. crops.

“Even with surplus available wheat supplies for export, high prices and freight costs are not likely to make U.S. wheat an attractive alternative for Black Sea buyers,” Jacqueline Holland, an analyst at Farm Futures, said in a blog post.

Weekly U.S. wheat export sales came in below the average in a Bloomberg survey. The country’s supply remains uncompetitive versus other origins like France, consultant Agritel said in a note.

In other crops, soybean futures for May delivery saw a second straight week of gains as drought shrinks the production outlook in top grower Brazil.

Grain and oilseed prices are in sharp focus as food inflation surges. The United Nations warned on Friday that record-high global food costs could jump another 22% as Russia’s assault on Ukraine stifles trade and slashes future harvests.