The South African Constitutional Court on Tuesday dismissed an appeal for a no-confidence motion against President Jacob Zuma in Parliament.
"The appeal is dismissed," Judge Dikgang Moseneke said.
An application for the purpose was tabled late last year by the Democratic Alliance (DA) with the backing of seven other opposition parties.
National Assembly Speaker Max Sisulu at that time adjourned a programming committee meeting without the debate being scheduled, on the basis that no consensus had been reached.
The opposition wanted the court to declare that the Parliament had failed to fulfill a constitutional obligation when the debate did not take place.
The court ruled that the Parliament's rules do not fall in line with the Constitution as they do not provide for an MP to have a motion of no confidence debate scheduled.
Therefore, the court ordered the Parliament to align its rules with the Constitution within six months.
DA parliamentary leader Lindiwe Mazibuko said the party has achieved its main objective which was to amend the legislature's rules.
"It has a huge bearing on the soundness of our democracy, the ability of our president to be held accountable by Parliament at any point," Mazibuko said.
The ruling African National Congress (ANC) welcomed the ruling, saying it was "a victory for the rule of law and the doctrine of separation of powers."
The party's chief whip Stone Sizani said the courts have no business in this matter as it is a political dispute
"In our view, it is a political dispute that can be resolved by parties within Parliament," Sizani said.
The DA tabled the no-confidence appeal against Zuma on the grounds that the South African people have lost confidence in Zuma as he failed to deliver his promises.
One of his promises was to create 5 million new jobs by 2020, but unemployment rose again during his third year in office and the economy had lost half a million jobs since he assumed the presidency, the DA says.