CAPE TOWN, July 18 (Aljazeera) - South Africa’s President Cyril Ramaphosa said that any attempt to arrest Russian President Vladimir Putin when he visits the country next month would be a declaration of war with Russia.

Ramaphosa said in court papers that were released on Tuesday that “Russia has made it clear that arresting its sitting President would be a declaration of war.”

Putin has been invited to a BRICS summit in Johannesburg next month but is the target of an International Criminal Court arrest warrant – a provision that Pretoria as an ICC member would be expected to implement were he to attend.

South Africa’s diplomatic dilemma is playing out in court, where the leading opposition party, the Democratic Alliance (DA), is trying to force the government’s hand and ensure the Kremlin leader is held and handed over to the ICC if he steps foot in the country.

In his response, Ramaphosa described the DA’s application as “irresponsible” and said national security was at stake. According to the president, South Africa is seeking an exemption under ICC rules based on the fact that enacting the arrest could threaten the “security, peace and order of the state”.

“It would be inconsistent with our constitution to risk engaging in war with Russia,” he said, adding that this would go against his duty to protect the country.

The arrest would also undermine a South African-led mission to end the war in Ukraine and “foreclose any peaceful solution”, Ramaphosa wrote.

The ICC treaty states that a member country should consult the court when it identifies problems that may impede the execution of a request, and that the court may not proceed with requesting an arrest if this would require a state to break international rules on diplomatic immunity.