Lawmakers of South Africa's ruling African National Congress (ANC) pledged to back President Jacob Zuma in a no-confidence motion in parliament later on Tuesday, a show of support that would thwart opposition efforts to force him to step down.

Zuma, who has held power since 2009, has struggled to fend off accusations of corruption and mismanaging the economy and if the vote was to carry, he would have to relinquish office.

The parliamentary speaker on Monday ruled it would be a secret ballot -- a decision the opposition hoped would embolden ANC members who are unhappy with Zuma to vote against him.

The ANC has 249 seats in the 400-seat parliament and the opposition controls 151, so it would take 50 ANC lawmakers backing the opposition to vote Zuma and his cabinet out.

The party, which has ruled South Africa since the end of apartheid in 1994, is deeply divided and several ANC lawmakers have voiced criticism of Zuma.

But ANC chief whip Jackson Mthembu said that at a meeting on Tuesday before the parliamentary session, the party resolved to support him. Several ANC lawmakers left the meeting singing, he said.

"You hear the singing," Mthembu told eNCA television channel. "Zuma was toyi-toying (dancing), that is what we do when we are under attack," Mthembu said.

Zuma, who also attended the meeting, was described as being calm and jovial.

On the streets, however, protesters blocked roads with burning tyres and rocks in a show of opposition to Zuma before the vote.

Earlier, markets had welcomed Speaker Baleka Mbete's decision on the secret ballot, with the rand, bonds and banking shares surging after Mbete's announcement, buoyed by the prospect of Zuma's removal. On Tuesday, the rand traded flat as markets waited anxiously.

In the past year, Zuma has upset investors, in particular by removing finance minister Pravin Gordhan in March. The country's credit rating has been downgraded to junk by two of the top three credit rating agencies, unemployment is at a 14-year high of 27.7 percent and the economy is back in recession.

"Jacob Zuma has brought our nation to its knees," the main opposition Democratic Alliance (DA) party, which brought the motion to parliament, said in a statement urging lawmakers to vote the president out.

Across Gauteng province, where the commercial hub Johannesburg and capital Pretoria are located, protesters blocked major roads with burning tyres and rocks.

Many wore DA blue colours and carried posters saying "Fire Zuma." Other posters featured a cartoon of Zuma in a dustbin.

ANC members rallied in Cape Town, where parliament is located, to support Zuma, some carrying placards saying: "Zuma must stay".

Opposition parties also planned a march in Cape Town to push for Zuma's removal. The leftist Economic Freedom Fighters party was expected to hold a protest in Pretoria.

Newspaper headlines also reflected the high stakes at play -- "JZ's moment of truth" read The Star, while The Sowetan declared: "High Noon for Zuma".

Zuma's tenure as South Africa's president is due to run until 2019, when national elections will be held.

He has survived eight no-confidence votes during his eight years in power thanks to loyal voting by ANC lawmakers, who form a strong parliamentary majority. But those votes were not secret.

"This motion, just like others before it, will be defeated," a statement from the ANC's chief whip Jackson Mthembu said.

But ANC lawmaker Derek Hanekom, who was removed as tourism minister in the cabinet reshuffle that cost Gordhan his job, said on Twitter that lawmakers must vote against "massive looting and corruption. Vote for change".

Nomura analyst Peter Attard Montalto said the decision to have a secret ballot was "a significant surprise" but he expected Zuma to survive.

"We still expect the vote to fail, but attach a 30 percent chance of success," he said.

If the motion is successful, Zuma would be removed as state president but would remain as ANC leader until December, when he is due to step down and a new leader elected in his place.

Should he be forced to quit as South Africa's president, the speaker takes over and the National Assembly is expected to elect a new national leader within 30 days.

As the largest party in parliament, the ANC would be expected to select the new president and government.

The ANC -- once all-powerful as heir of South Africa's anti-apartheid struggle -- has lost popularity under Zuma, underscored by its worst electoral showing in over two decades of power in local elections last year. Thousands of people took part in protest marches in April calling for Zuma to step down