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.
South Africa has since it's hosting of the African Union Summit past year complained that the ICC is unfair in the way it treats African governments and is incompatible with Pretoria's peace initiatives on the continent.
South Africa's government still plans to withdraw from the International Criminal Court (ICC), Justice Minister Michael Masutha said on Wednesday, after a court ruled that it was unconstitutional to do so.
South Africa's largest opposition party, the Democratic Alliance, praised the High Court's decision.
Under the Rome Statute, South Africa as an ICC member has an obligation to arrest anyone sought by the tribunal.
The court's ruling will force the parliament to open up the decision to the public - a critical part of the debate, said Phephelaphi Dube, director of the Centre for Constitutional Rights. While the executive branch has unfettered power to enter into global treaties, in its precedent-setting judgment the court found that it can not withdraw from those same treaties without legislative approval.
Judge Phinehas Mojapelo gave the ruling on Wednesday in Pretoria, the country's administrative headquarters ordering that government should revoke it..
He said the government would decide on how to proceed, including a possible appeal, after reading the full judgment.
The ICC has had to fight off allegations of pursuing a neo-colonial agenda in Africa, where most of its investigations have been based.
A high court judge instructed the government to revoke its notice of withdrawal from the court based in The Hague, Netherlands. Gambia's President Adama Barrow, elected in December, said earlier this month it will remain in the ICC.
"It's expected that the executive go back to parliament".
The process of withdrawal lasts one year and, in the case of South Africa, would take place this October.
They are accusing ICC of focusing on human right abuse in Africa while neglecting.
South Africans leading the push said that obligations under the ICC clash with diplomatic immunity laws of sitting leaders and promotes "regime change".
The ruling African National Congress holds a majority in parliament and can force through its decision if it wants.