Turkey on Saturday announced the extension of a deal that has allowed exports of Ukrainian grain to resume following Russia's invasion, but it was unclear if it had been prolonged for 60 or 120 days.

Russia said it had agreed to a 60-day extension, while Ukraine's infrastructure minister said the deal had been extended for 120 days.

Turkey and the United Nations did not specify the duration.

"Following talks with the two parties, we have assured the extension of the deal that was due to expire on March 19," President Recep Tayyip Erdogan said in comments broadcast on Turkish television just hours before the agreement was due to expire.

"This deal is of vital importance for the global food supply. I thank Russia and Ukraine, who didn't spare their efforts for a new extension, as well as the United Nations secretary general."

Russia's full-scale invasion in February 2022 saw Ukraine's Black Sea ports blocked by warships.

But a deal brokered by Turkey and the United Nations in July 2022 -- and signed by Kyiv and Moscow -- had allowed for the safe passage of exports of critical grain supplies.

- Easing food crunch -

Ukraine was one of the world's top grain producers, and the so-called Black Sea Grain Initiative has helped soothe the global food crunch triggered by the conflict.

"(The) Black Sea Grain Initiative agreement is extended for 120 days. Grateful to Antonio Guterres, the United Nations, President Erdogan, (Turkish defence minister) Hulusi Akar and all our partners for sticking to the agreements," Ukraine's infrastructure minister Oleksandr Kubrakov said on Twitter.

Russian foreign ministry spokeswoman Maria Zakharova said: "We are seeing reports from parties to the 'grain deal' that the deal has been extended for 120 days.

"We have repeatedly stated... that the Russian side has notified all parties to the deal that it is extending the deal for 60 days," Zakharova said in remarks carried by the Interfax news agency.

The UN has said it was doing everything it could to save the agreement, which has helped bring the explosion in food prices under control.

"The Black Sea Grain Initiative... has been extended", the spokesman for the UN's secretary-general said, without saying how long for.

The initial 120-day agreement was extended in November until March 18.

But citing concerns that a parallel agreement on Russian food and fertiliser exports was not being respected, Moscow proposed just a 60-day extension.