Days after Russia suspended support for grain exports through the Black Sea, it has agreed with Turkey to restart its participation in the agreement.
Russia accused Ukraine on Saturday of using a safety corridor for grain ships to attack its fleet in Crimea.
However, the UN, Turkey and Ukraine continued sending ships even after Russia halted its support for the deal.
Now, Russia's defence ministry says Kyiv has given written assurances not to use the route for military action.
But Germany's foreign minister said it showed what the international community could achieve if it refused to be blackmailed by Russia.
The deal was brokered by the UN and Turkey in July, bringing to an end a five-month Russian blockade of Ukrainian ports that trapped millions of tonnes of grain and sunflower oil
Under the agreement, ships are allowed to sail through a safe corridor before being inspected by a special co-ordination team in Turkey and then heading on through the Bosphorous Strait.
According to the UN, 9.8m tonnes of grain, oil and soya beans have been transported in more than 400 shipments around the world since the operation began on 3 August.