CAPE TOWN, South Africa (AP) — Vladimir Putin has agreed not to attend an economic summit in Johannesburg next month that will include China’s premier and other world leaders because of an arrest warrant by the International Criminal Court for the Russian president, South African authorities said Wednesday.

Russia and summit host South Africa reached a “mutual agreement” that Putin would not attend the Aug. 22-24 gathering, which brings together a bloc of developing economies known as BRICS, though he was initially invited, the office of South African President Cyril Ramaphosa said.

The development could be viewed as embarrassing for Putin, who is now expected to be the only leader of a country in the bloc not to attend.

Kremlin spokesman Dmitry Peskov said Wednesday that Putin “has decided to take part” in the summit via video link, without confirming if he had intended to attend the summit.

It ended months of speculation over whether Putin would travel to South Africa, which is a signatory to the Rome treaty that formed the International Criminal Court and therefore has the obligation to arrest the Russian leader if he sets foot on South African territory.

South Africa had given strong hints that it would not arrest Putin if he attended but had also been lobbying for him not to come to avoid the problem.

South Africa said as recently as last week that the Russian leader had been determined to attend, perhaps as a way to challenge the ICC warrant, which Moscow has dismissed.

Moscow has showcased the BRICS alliance as an alternative to the West’s global dominance, but this year’s meeting has proved awkward for Putin following the ICC’s move in March to indict him for war crimes relating to the abduction of children from Ukraine.

Although Moscow dismissed the warrant, Putin has not traveled to a country that is a signatory to the ICC treaty since his indictment. Analysts have said that the public debate about whether the Russian leader would or would not travel to South Africa was in itself an unwelcome development for the Kremlin.

The South African government has strong political ties with Russia, but Putin’s attendance would have exposed it to possible diplomatic and legal repercussions.

South Africa’s main opposition party has recently taken the government to court in an attempt to compel it to arrest Putin should he travel to the country. The ICC treaty has also became part of South African domestic law, meaning the government could be taken to court in South Africa if it failed to honor its commitment to the international court.

Ramaphosa spoke with Putin by telephone this weekend and held more “consultations” with BRICS officials on Tuesday, Ramapohosa’s office said in a statement. Russian Foreign Minister Sergey Lavrov would attend the BRICS summit in person to represent Russia, Ramaphosa’s office said.

Meanwhile, the leaders of all the other BRICS nations, including China’s Xi Jinping, would attend the summit, Ramaphosa’s office said.

Wednesday’s announcement comes a day after a court document was made public in which Ramaphosa said that any attempt by South Africa to arrest Putin would be viewed as a “declaration of war” by Russia. The affidavit made by Ramaphosa was part of the government’s response to the court challenge brought by the country’s main opposition party to compel it to arrest Putin.

“I must highlight, for the sake of transparency, that South Africa has obvious problems with executing a request to arrest and surrender President Putin,” Ramaphosa said in the affidavit. “Russia has made it clear that arresting its sitting president would be a declaration of war.”

However, Kremlin spokesman Peskov denied that.

“No one has indicated anything to anyone,” Peskov said. “In this world, it is absolutely clear to everyone what an attempt to encroach on the head of the Russian state means. So there is no need to explain anything to anyone here.”

___

AP writers Dasha Litvinova in Tallinn, Estonia, and Mogomotsi Magome in Johannesburg contributed to this story.

___

AP Africa news: https://apnews.com/hub/africa