South Africa announced in October it had lodged its decision to withdraw with the United Nations, following a dispute over Sudanese President Omar al-Bashir visiting the country.
Earlier this year, the South African Supreme Court of Appeal (SCA) upheld a High Court ruling that the government should have arrested Bashir while he was in the country in June 2015.
South Africa's decision to withdraw from the International Criminal Court (ICC) has been ruled invalid and unconstitutional by the country's High Court. This issue lies at the root of South Africa's dissatisfaction with the ICC, and was cited by Nkoana-Mashabane in a statement appended to the notice of withdrawal.
Wednesday's decision in Pretoria high court was largely expected as Mojapelo had already told government lawyers during a previous hearing that he was concerned that officials had exceeded their constitutional powers.
In its withdrawal notice, South Africa complained that its legal obligations to the global court were sometimes "incompatible" with the "peaceful resolution of conflicts". The court ordered President Jacob Zuma, Nkoana-Mashabane and Justice Minister Michael Masutha to revoke the notice.
Masutha said the ruling amounted to a delay that would not stop the government's bid to leave an institution that some African governments feel unfairly targets Africans and which Pretoria said was at odds with its diplomatic immunity laws. As one of the original supporters of the court, its announcement of withdrawal last October was a major blow to the future of the Netherlands-based court that prosecutes war crimes and crimes against humanity.
The court did not rule on whether or not South Africa should withdraw from the treaty. It criticized the government for trying to "steamroll" over the constitution.
But if the government is eventually forced to go to Parliament for approval, it can expect a bruising battle.
They are accusing ICC of focusing on human right abuse in Africa while neglecting.
But on February14, The Gambia told the United Nations that it would remain in the ICC, reversing the previous administration's plan to withdraw from the tribunal.
South Africa's parliament began considering the ICC issue last month - three months after the government announced its withdrawal.
For many South Africans, the controversy is more about Zuma taking unilateral action without parliamentary approval than the decision to withdraw from the ICC itself, says Chloe McGrath, Africa expert at Washington-based think tank the Atlantic Council.
The ruling African National Congress holds a majority in parliament and can force through its decision if it wants.