A Black Sea grain initiative that was set to expire on Saturday will be extended for 120 days, Ukraine and Russia said on Thursday.
"Black Sea grain initiative will be prolonged for 120 days," Ukraine's Infrastructure Minister Oleksandr Kubrakov said on Twitter.
The move is "another important step in the global fight against the food crisis", he said.
The deal, which was also brokered by Turkey and the UN, came into effect in July after warnings that a halt in exports from Ukraine could lead to global food shortages and famine.
It guarantees safe passage for Ukrainian grain exports through certain Black Sea ports as the war with Russia continues.
Russia's Foreign Ministry confirmed the extension of the deal without any changes to the current one, it said in a statement on Thursday.
"The Russian side is also allowing for the technical extension of the grain initiative without changes in terms or scope," ministry spokeswoman Maria Zakharova said, after fears that the landmark deal allowing the resumption of Ukrainian grain exports would not be reconvened.
Turkish President Recep Tayyip Erdogan said the extension of the deal was the result of discussions involving Turkey, the UN, Russia and Ukraine.
Turkey hosted the talks.
"I would like to thank United Nations Secretary General Antonio Guterres, President [Vladimir] Putin of Russia and President [Volodymyr] Zelenskyy of Ukraine, for their willingness to prolong the agreement, and I would also like to congratulate all those who contributed," Mr Erdogan said on Twitter.
He said the importance of the agreement became clear with the delivery of more than 11 million tonnes of grain and food items to those in need in the past four months.
Mr Guterres said the initiative "continues to demonstrate the importance of discreet diplomacy in the context of finding multilateral solutions".
"I welcome the agreement by all parties to continue the Black Sea grain initiative to facilitate the safe navigation of export of grain, foodstuffs and fertilisers from Ukraine," he said.
"The United Nations is fully committed to supporting the Joint Co-ordination Centre so that this vital supply line continues to function smoothly. The United Nations is also fully committed to removing the remaining obstacles to exporting food and fertilisers from the Russian Federation.
"Both agreements signed in Istanbul three months ago are essential to bring down the prices of food and fertiliser and avoid a global food crisis."
The price of wheat has increased by 50 per cent since 2021, but is stable, partly because of the grain initiative.
UN figures show that, under the initiative, nearly 500 ships have delivered grain and other food items to the world's poorest countries.
Last month, Russia briefly suspended its participation, but returned after the UN, Turkey and Ukraine promised to continue.
Mr Putin complained that the deal did not do enough to ease exports of Russian grain and fertiliser, which are not subject to sanctions, as shipment volumes increased.