South Africa's decision to withdraw from the International Criminal Court (ICC) has been ruled "unconstitutional and invalid" by the High Court.
South Africa notified the UN of its intention to leave last October, accusing the ICC of undermining its sovereignty.
But the opposition Democratic Alliance (DA) argued that the government had to first seek parliamentary approval.
The court ordered the government to revoke its notice of withdrawal.
The decision to pull out came after a dispute over Sudanese President Omar al-Bashar's visit to the country in 2015.
South African authorities refused to arrest Mr Bashir despite him facing an ICC arrest warrant over alleged war crimes.
Mr Bashir was attending an African Union summit in Johannesburg, when the government ignored an ICC request to arrest him.
The DA welcomed the judgement.
"The withdrawal by the South African government from the ICC was irrational and unconstitutional," DA lawmaker James Selfie told AFP.
"We would like South Africa to stay in the ICC because we believe that it is consistent with our constitution and with the legacy of Nelson Mandela."
Latest Stories
-
Nigerians mourn woman allegedly beheaded by gospel singer
21 minutes -
Sudan shelling kills more than 100 civilians near capital
28 minutes -
Mahama hits the ground running: Key reforms and directives in first days of office
32 minutes -
Relatives wait for news as body bags hauled from South African mine
39 minutes -
Kate reveals she is in remission from cancer
59 minutes -
UK’s Treasury minister resigns over anti-corruption investigation in Bangladesh
1 hour -
Fire Service calls for installation of fire extinguishers, detectors at marketplaces
1 hour -
Kofi Adu Domfeh: Prayers for rain in LA and the call for climate action
1 hour -
Don’t appoint Bawku or Kusasi native as U/E Regional Minister – Asamoah Boateng advises Mahama on averting dispute
2 hours -
Bono COCOBOD seizes trucks loaded with bags of cocoa, lumber
2 hours -
Recent Appointment Committees have become a theatre – Draman
2 hours -
Mahama appoints Justina Nelson as Acting CEO of MIIF
3 hours -
Tribunal system was evil, why does Mahama gov’t want it back? – Ansa-Asare
3 hours -
Kurt Okraku files nomination for CAF Executive Committee position
4 hours -
Criminologist urges police to engage communities to prevent attacks on security personnel
4 hours