Former Russian President Dmitry Medvedev said on Sunday that if the Group of Seven moved to ban exports to Russia, Moscow would respond by terminating the Black Sea Grain deal that enables vital exports of grain from Ukraine.

The G7 countries are considering a near-total ban on exports to Russia, Japan's Kyodo news agency reported last week, citing Japanese government sources. Russia has repeatedly threatened to scrap its participation in the grain deal, which is due to expire on May 18.

"This idea from the idiots at the G7 about a total ban of exports to our country by default is beautiful in that it implies a reciprocal ban on imports from our country, including categories of goods that are the most sensitive for the G7," Medvedev said in a post on his Telegram channel.