Since the Russian assault began, countries from Hungary to Indonesia have moved to bar the door to exports, corralling grains and cooking oils to feed their own and risking a round of trade protectionism that could deepen global supply and price woes.

Around the world, food prices were already rising fast amid supply chain disruptions and pandemic-era inflation. But some prices — especially wheat, a basic source of sustenance in many countries — have shot through the roof because of the Ukraine crisis, upending calculations of the world’s available food supply and leading to the rationing of flour in parts of the Middle East.

Together, Ukraine and Russia account for nearly 30 percent of wheat, 17 percent of corn and over half of sunflower seed oil exports. The conflict-inducted bottlenecks at Black Sea ports — where cargo vessels have been struck by Russian rockets — and other complications of war have slammed Ukrainian exports. Boycotts of Russian ports by shipping companies and the knock-on effects of sanctions have also disrupted the flow of foods and feeds from Russia — creating problems that could grow as the Kremlin now threatens to impose export controls on some food commodities.

As bad as it is — a key wheat future surged 70 percent over the past month — the situation is poised to get worse. A new report by the Food and Agriculture Organization of the United Nations (FAO) due out Friday estimates food and feed prices could surge 7 percent to 22 percent above already elevated levels due to the war.

In real terms — with prices adjusted for inflation — costs are approaching, but not yet surpassing, the global food crisis of 2007 and 2008, when droughts, the rise of biofuels and a barrage of trade protectionism merged into the worst food inflation since the Soviet grain crisis of the 1970s.

In the short run, the FAO says, large grower countries — Australia, Argentina, India and the United States — could make up for a portion of the grain shortfalls from Ukraine and Russia. But important factors could worsen the problem.

If the war halts planting in the rich, black soils of Ukraine, wheat shortages will worsen in the coming months. The FAO’s preliminary assessment is that, due to the war, 20 percent to 30 percent of wheat, corn and sunflower seed will either not be planted or go unharvested during Ukraine’s 2022-2023 season.

Critically, Russia is also a major exporter of fertilizer, the price of which has already been soaring. Significant disruptions of Russian exports could see that price jump more — further driving up the cost of food production globally.

To guard their food supplies, countries are turning to trade protectionism — one major factor that sharply worsened the 2007-2008 crisis. Since the Russian invasion, Indonesia has set new limits on palm oil exports to control prices. Hungary banned all grain exports last week; Serbia on Wednesday said it would ban exports of wheat, corn, flour and cooking oil. On Thursday, Egypt — a country 80 percent reliant on Russian and Ukrainian wheat — imposed controls on grain exports as the price of subsidized bread has already started to creep up.

Facing a siege of its cities and a war that has seen Ukrainian tractors redeployed to haul off Russian tanks, Kyiv has halted exports of meat, rye, oats, buckwheat, sugar, millet and salt, and introduced some restrictions on wheat and corn. Russia, according to Reuters citing the Interfax news agency, may temporarily ban grain exports to a group of ex-Soviet countries, as well as some sugar exports.

“There are a lot of uncertainties, but if the conflict is not resolved in the short term, we could experience a situation that potentially ends with a food crisis,” Maximo Torero, FAO’s chief economist, told me.

In some quarters, a sense of panic is already building. In Turkey, a run on sunflower oil — as ships carrying resupplies stalled in the Black Sea — saw desperate shoppers pick supermarket supplies clean in viral videos shared on Turkish social media.

Grains are global commodities, and the price for flour, bread and other foods is set to hike across the globe, including in the United States. But the countries most impacted are likely to be those most heavily dependent on Ukrainian and Russian wheat — including Egypt, Turkey, Bangladesh, Indonesia, Eritrea, Kazakhstan, Mongolia, Armenia, Azerbaijan, Georgia, Lebanon and Somalia.

“We will only be using wheat for the production of bread until we can ensure alternative sources of grain imports from Canada and others,” Lebanon’s Minister for Industry George Bouchkian tweeted last weekend.

Experts have warned that higher food prices could trigger global unrest. During the 2007-2008 crisis, riots broke out from Haiti to Bangladesh. The social uprisings of the Arab Spring also took place against a backdrop of public angst over the high cost of food.

There are signs of food-driven unrest is happening again. In Iraq, protests broke out this week in the impoverished south over surging prices, Al Jazeera reported.

“The rise in prices is strangling us, whether it is bread or other food products,” a retired teacher Hassan Kazem told AFP news agency. “We can barely make ends meet.”

The food price surge will also complicate global efforts to fend off hunger in conflict-ridden and fragile states from Afghanistan to Haiti.

Pandemic-era inflation and supply chain woes caused dramatic spikes in food and energy costs even before the Russian invasion, making it more expensive to aid countries in crisis even as millions across the globe fell into poverty and the risk of hunger grew. Between 2019 and 2022, the number of people at the brink of famine rose from 27 million to 44 million, with additional 232 million people one step behind that category, David Beasley, executive director of the U.N. World Food Program (WFP), wrote in The Washington Post.

The agency, which delivers emergency food aid, was already paying 30 percent more for supplies than it was in 2019, amounting to an additional $50 million every month, Beasley wrote. “If the Black Sea transport corridors are disrupted further by this burgeoning war, transport prices will spike in lockstep, doubling or even tripling,” he added.

The WFP had already been forced to cut food rations in Yemen before Russia invaded Ukraine. Now, it may have to make more cuts.

“We’re taking from the hungry to feed the starving, is what it comes down to, just because the numbers are so great,” said Steve Taravella, WFP senior spokesman. “Conflict, covid, climate — we talk about the three Cs, those things that are driving hunger around the world. The reality is Ukraine is putting a fourth C on that: Cost.”