With much fanfare, ship after ship loaded with grain has sailed from Ukraine after being stuck in the country's Black Sea ports for nearly six months. More quietly, a parallel wartime deal met Moscow's demands to clear the way for its wheat to get to the world, too, boosting an industry vital to Russia's economy that had been ensnared in wider sanctions.

While the U.S. and its European allies work to crush Russia's finances with a web of penalties for invading Ukraine, they have avoided directly sanctioning grains and other goods that feed people worldwide.

Russian and Ukrainian wheat, barley, corn and sunflower oil are important to countries in Asia, Africa and the Middle East, where millions rely on subsidized bread for survival. As the war spiked food and energy prices, millions of people have been pushed into poverty or closer to the brink of starvation.

Two deals that the UN and Turkey brokered last month to unblock food supplies depend on each other: one protects ships exporting Ukrainian grain through the Black Sea and the other assures Russia that its food and fertilizer won't face sanctions, safeguarding one of the pillars of its economy and helping ease concerns from insurers and banks.

The agreement allowed a Western shipper to move two vessels of grain out of Russia in a matter of weeks. It used to take months because Western banks refused to transfer payments to Russia. Although U.S. and European Union sanctions don't directly target Russian agriculture, Western banks have been wary of running afoul, hindering buyers' and shippers' access to Russian grain.

"You have to invest time with the banks to make them understand this whole thing because the authority says, `Go ahead there's no sanction,' but the banks self-sanction," said Gaurav Srivastava, whose company Harvest Commodities buys, ships and sells grains from the Black Sea region.

He called the process with banks a "labor intensive exercise."

What's changed in recent weeks, Srivastava said, is "the appearance ... of this being sort of a truce between all parties."

The deal mattered to Russia because it's the world's biggest exporter of wheat, accounting for almost a fifth of global shipments, and the country is expected to have one of its best-ever crop seasons this year. Agriculture accounts for around 4% of Russia's gross domestic product, according to the World Bank.

"What is more important is employment," said Russian economist Sergey Aleksashenko, referring to jobs created by agriculture. "It's like 7 to 8% of employment."

Farming provides 5-6 million Russian jobs, with some regions almost entirely dependent on it for their livelihood, he said.

Srivastava, whose company operates from Los Angeles and Geneva, hopes to be able to ship out 10-15 million tons of Russian grain over the coming year.

He also has been able to move out two chartered ships that were stuck at Ukrainian ports since the start of the war on Feb. 24. He said the company is aiming to pick up 1 million tons of grain from Ukraine under the four-month-long UN deal.

"We are a commercial business, but we are trying to help the plight of farmers in both Russia and Ukraine," Srivastava said. "I'm very optimistic, especially in the last couple of weeks."

Russia's demands for the deal included public statements from the U.S. and EU that sanctions don't target Russian food and fertilizer. It also raised issues around financial transactions to the Russian Agricultural Bank, access for Russian-flagged vessels at ports and ammonia exports needed for fertilizer production.

A week before Russia signed the agreement, the U.S. Treasury Department issued statements with such assurances. It made clear that Washington hadn't imposed sanctions on the sale or transport of agricultural commodities or medicine from Russia.

Treasury also issued a broad license to authorize certain transactions related to agricultural commodities, saying the U.S. "strongly supports efforts by the United Nations to bring both Ukrainian and Russian grain to world markets and to reduce the impact of Russia's unprovoked war on Ukraine on global food supplies and prices."

The EU also reiterated that Russian agriculture hadn't been sanctioned and blamed the global spike in food prices on the war and the Kremlin's agricultural export caps meant to protect its domestic market. The 27-nation bloc said its sanctions provide exceptions, such as allowing EU countries to authorize access to ports for Russian-flagged vessels for trade in agricultural or food products.

Russia says it's still facing challenges.

The country's agriculture ministry says difficulty with the supply of imported farming equipment, which isn't directly sanctioned, also threatens the grain harvest. It said domestic needs would be met, but that exports might be affected.

Even after the deal was signed, Russian Foreign Minister Sergey Lavrov chided Western assurances that agriculture was exempt from sanctions. During a diplomatic tour of Africa focused on food exports, he said a "half-truth is worse than a lie" while pointing to the chilling effect of sanctions.

UN Secretary-General Antonio Guterres "committed himself to press the Western countries to lift those restrictions," Lavrov said. "We'll see whether he can succeed."

Meanwhile, Russian and Ukrainian grains are ever more critical to averting hunger in developing countries. S&P Global Commodity Insights said in a June report that 41 million tons of Russian wheat could be available for export this year.

But overall, the world is expected to produce 12.2 million tons less wheat and 19 million tons less corn for the 2022-2023 harvest compared with the previous year, International Grains Council Executive Director Arnaud Petit said. This is in part due to the war in Ukraine and drought in Europe, he said.

While a strong U.S. dollar and inflation may force some countries to ration food imports, Petit noted that some countries are imposing export controls that could impact the availability of grains in sub-Saharan Africa and the Middle East.

------

Raf Casert contributed to this report from Brussels.