July 19 (UPI) — South Africa and Russia agreed that Russian President Vladimir Putin will not attend the BRICS summit in Johannesburg as he faces an arrest warrant from the International Criminal Court, officials said Wednesday.

The office of South African President Cyril Ramaphosa announced Wednesday that the two nations reached a “mutual agreement” for Putin to not attend the summit in person. The Kremlin will be physically represented by Foreign Minister Sergei Lavrov.

Kremlin spokesman Dmitry Peskov, however, added that Putin will still address the summit by video link.

Ramaphosa said in a court document made public Tuesday that hosting Putin would have threatened South Africa’s national security.

“Russia has made it clear that arresting its sitting president would be a declaration of war. It would be inconsistent with our constitution to risk engaging in war with Russia,” he said.

The ICC had issued an arrest warrant for Putin in March in connection with the forced deportation of thousands of Ukrainian children to Russia during an invasion of Ukraine. South Africa is a signatory to the ICC, making them responsible for enforcing the arrest warrant.

Putin had debated attending the BRICS Summit as South African officials said in May they would extend diplomatic immunity to Putin and any world leader who attended the meeting of Brazil, Russia, India, China and South Africa.

South African opposition leaders had gone to court to force Ramaphosa’s government to arrest Putin if he landed on South African soil.

The decision was met with criticism by Russian supporters, who charged that South Africa should have insisted on sovereignty and prevented Putin from being arrested.