Any attempt to arrest Vladimir Putin wen im visit South Africa go be declaration of war against Russia, di kontri president tok.
Cyril Ramaphosa make di warning as e remain some weeks before one international meeting go happun for Johannesburg, to wey dem invite di Russian president.
But if Oga Putin leave Russia soil, e go dey subjected to one International Criminal Court (ICC) arrest warrant.
South Africa na ICC signatory and gatz help for im arrest.
Yet dem don refuse to honour dat obligation for di past - as dem allow safe passage for 2015 to Sudan former President Omar al-Bashir wey dey wanted for war crimes against im own pipo.
Oga Putin don dey invited to South Africa for August, wen di kontri go host one summit for members of di Brics kontris - acronym for Brazil, Russia, India, China and South Africa. Dis bloc of fast-growing economies dey seen by some as alternative to di G7 group of advanced economies.
South Africa biggest opposition party, Democratic Alliance, don go to court to try to force di authorities to carry out arrest on Oga Putin if im visit di kontri.
Court documents reveal say President Ramaphosa dey firmly against any such move, as e tok say national security dey at stake.
"South Africa get obvious problems wit executing one request to arrest and surrender President Putin," e tok for one affidavit.
"Russia don make am clear say arresting dia sitting president go be declaration of war. E go dey inconsistent wit our constitution to risk engaging in war wit Russia."
President Ramaphosa add say South Africa na one of several African nations wey dey hold tok-tok wit Russia and Ukraine "with a view of ending di war altogether", and attempt to arrest Oga Putin go dey counter-productive.
Last month, e get one peace mission to di European nations, where African presidents hope dem fit bring Ukraine and Russia to di table togeda but ultimately fail.
Dem say African nations dey dey reluctant to back UN general assembly resolutions wey condemn Russia war for Ukraine.
Correspondents say di reasons depend on di nation - be it South Africa anti-apartheid ties to di Soviet Union, or Mali present-day reliance on Russian Wagner mercenaries to fight jihadists.
Economic ties dey between Russia and African nations too, not least for South Africa.
One Russian oligarch, Viktor Vekselberg, wey dem sanctioned na one of the biggest donors to South Africa governing party - di African National Congress (ANC).