Russia said on Wednesday it would renew its participation in an agreement allowing Ukraine to export grain via the Black Sea, just four days after suspending its role in the deal.
Moscow had pulled out at the weekend, saying it could not guarantee the safety of civilian ships crossing the Black Sea because of a drone attack on its fleet there.
"The Russian Federation considers that the guarantees received at the moment appear sufficient, and resumes the implementation of the agreement," the defense ministry said in a statement.
The U-turn followed a phone call between Russian President Vladimir Putin and Turkish President Tayyip Erdogan on Tuesday and repeated conversations between their defense ministers.
United Nations and Turkey get involved
The ministry said that thanks to the involvement of the United Nations and Turkey, it had been possible to obtain written guarantees from Ukraine that it would not use the humanitarian corridor and Ukrainian ports to conduct military operations against Russia.
The statement represented an about-turn by Moscow, which had previously said it would be risky and unacceptable for ships to continue sailing through the humanitarian corridor set up under a Turkish- and UN-brokered deal in July.
Moscow's about-turn
Despite the Russian move, ships had continued to export Ukrainian grain, and a record volume moved on Monday.
Russian political analyst Tatiana Stanovaya said Wednesday's announcement represented an acknowledgment by Putin that he could not block the shipments.
"The Kremlin itself simply fell into a trap from which it did not know how to get out," she said.
"It was necessary to retreat and put on a good face (not very successfully) when faced with a bad game. That is, Putin, no matter how preoccupied he is with Ukraine, his historical mission and faith that he's right, remains a moderately rational politician who knows how to retreat if necessary."