Opposition hopes secret ballot will encourage members of President Jacob Zuma’s ANC party to vote against him.

The highest court in South Africa has ruled that legislators can cast secret ballots in a confidence vote against President Jacob Zuma, an outcome the opposition hopes will pave the way for his removal.

The Constitutional Court ruled on Thursday that parliamentary speaker Baleka Mbete, a ruling African National Congress (ANC) member and Zuma ally, can decide on a secret vote.

Opposition parties wanted a secret ballot in the belief that disgruntled ANC legislators could turn against Zuma if their votes are not publicly disclosed.

Mbete had said parliamentary rules did not allow for a secret vote but Chief Justice Mogoeng Mogoeng disagreed on Thursday, saying she had “the necessary latitude”.

READ MORE: Political parties stage anti-Zuma protests in Pretoria

However, he stopped short of ordering a secret ballot, saying it would be a violation of the separation of powers between the Constitutional Court and parliament.

A date for the vote now has to be set.

The ANC holds a large majority in parliament and Zuma has survived similar votes in the past, which have not been secret.

Zuma’s sacking of respected Finance Minister Pravin Gordhan in March fuelled public anger over years of government corruption scandals, record unemployment and slowing economic growth.

The ANC has said it will vote against the motion to remove the 75-year-old leader.