Egypt will ban the export of key staples, including flour, lentils and wheat, as the most-populous Arab nation moves to safeguard its food reserves amid the fallout from Russia’s invasion of Ukraine.

The ban, which also covers pasta and fava beans, will apply for three months from the day after it’s published in the national Gazette, the country’s trade ministry said in a statement on the state-run Ahram Gate website.

Egypt imports most of its wheat from Russia and Ukraine, using those supplies as the cornerstone of a bread-subsidy program for millions of people. Soaring grain prices as the war roils international markets is putting pressure on the finances of the government, which wants to guard against profiteering.

Egypt’s move adds to the wave of food protectionism worldwide, risking further tumult for global crop trade. Moldova, Serbia and Hungary have all banned exports of some grains. Indonesia, the world’s biggest edible-oils exporter, is tightening controls over shipments. Top flour exporter Turkey boosted the agriculture ministry’s authority over an array of products, allowing it to make “periodical arrangements” if needed.

Egypt’s government is raising its target for purchases of local wheat to as much as 5.5 million tons, but people still need to “rationalize” their consumption, Prime Minister Mostafa Madbouly said Wednesday. He’s been meeting with ministers to review progress on keeping food stores stocked and affordable.

The war has pushed up wheat-flour prices by 19% and vegetable oils by 10%, Madbouly said. Consumer inflation had already accelerated to an annual 8.8% in February, driven by higher food prices. The squeeze comes at a delicate time for the Arab world as Ramadan approaches.

Russia has signaled it plans to restrict trade in some raw materials, although it has yet to specify which goods or countries will be affected. Its prime minister on Wednesday warned the country should prioritize its own wheat supplies in order to secure bread for citizens.