President Cyril Ramaphosa said Tuesday his ruling ANC party had resolved that South Africa should quit the International Criminal Court, which last month issued an arrest warrant against Russian President Vladimir Putin.
The ICC issued an arrest warrant against Putin in March meaning Pretoria, due to host the Brazil, Russia, India, China and South Africa bloc summit this year, would have to detain him on arrival.
"Yes, the governing party... has taken that decision that it is prudent that South Africa should pull out of the ICC," Ramaphosa said during a press conference co-hosted with the visiting President of Finland Sauli Niinisto.
Ramaphosa said the decision, which follows a weekend meeting of the African National Congress (ANC), was reached "largely" because of what is perceived as the court's unfair treatment of certain countries.
"We would like this matter of unfair treatment to be properly discussed, but in the meantime the governing party has decided once again that there should be a pull out," he said.
The arrest warrant against Putin followed accusations that the Kremlin unlawfully deported Ukrainian children.
On whether South Africa would arrest Putin, Ramaphosa said "that matter is under consideration".
A continental powerhouse, South Africa has refused to condemn the invasion of Ukraine which has largely isolated Moscow on the international stage, saying it wants to stay neutral and prefers dialogue to end the war.
It is not the first time South Africa has attempted to withdraw from the ICC.
It made an attempt in 2016 following a dispute a year earlier when the then Sudanese President Omar al-Bashir visited the country for an African Union summit. It refused to arrest him despite the then-leader facing an ICC arrest warrant over alleged war crimes.
The controversial decision to pull out was however revoked when a domestic court ruled such a move would have been unconstitutional.