Moscow may retaliate if Group of Seven countries proceed with a total ban on most exports to Russia by withdrawing from the safe-transit deal that allows Ukraine to ship grains from Black Sea ports, said Dmitry Medvedev, deputy chair of Russia’s Security Council. 

Russia would also consider banning exports of some of its own goods, Medvedev said in a Telegram post. 

G-7 officials are considering moving closer to an outright ban on most exports to Russia and are discussing the idea ahead of a leaders summit in Japan in May, according to people familiar with the matter. The proposal is still being debated and could change, the people said last week.

“The total ban on the export of goods to our country by default is a wonderful idea, because it also implies retaliation and a ban of the import of goods from our country,” said Medvedev, a former Russian prime minister and president. “The grain deal will end,” he added. 

On top of the G-7 discussions, the European Union is also set to propose a ban on many goods transiting through Russia as the bloc attempts to tighten enforcement of sanctions imposed over the past year, people said on Saturday. 

The safe-transit agreement, brokered by the UN and Turkey, has allowed Ukraine to export millions of tons of grain since last summer. Russia, which is currently the world’s largest wheat exporter, has repeatedly threatened to withdraw from the deal, which is next up for renewal in mid-May, if issues regarding its own grain and fertilizer shipments aren’t resolved. 

A shipment of Russian fertilizer held in Latvia since Moscow’s invasion of Ukraine 14 months ago has sailed for Kenya, Latvian authorities said on Saturday, in what was seen as a possible boost for efforts to extend the Black Sea deal.  

Russian Foreign Minister Sergei Lavrov is expected to discuss the grain agreement with UN Secretary-General Antonio Guterres while in New York this week to chair the UN Security Council meeting, Tass reported.  

Yet Medvedev’s comments suggest another hurdle for the agreement to continue.  

Medvedev is known for inflammatory comments on social media. He issued a veiled threat via Twitter on Friday to Boris Pistorius, Germany’s defense minister, saying that “the German who wishes to attack Russia, must be ready for our parade in Berlin.”