South Africa's President Jacob Zuma has survived an eighth vote of no confidence - despite the ballot being held in secret.
Opposition parties had hoped the secret vote would mean MPs from the governing African National Congress (ANC) might side with them against the President.
But the motion, called amid repeated allegations of corruption, was defeated by 198 votes to 177. This news was greeted with cheers and singing by ANC MPs.
The opposition had hoped ANC MPs might vote against their leader if the ballot was secret. In order for the no-confidence motion to pass, at least 50 out of the ANC's 249 MPs would have had to vote against the President.
Earlier, South Africa's opposition derided Zuma as a "broken and corrupt" leader.
"Since the dawn of our democracy, the stakes have never been higher," Mmusi Maimane, leader of the main opposition Democratic Alliance party, told lawmakers.
"Our choice is between right and wrong, between good and evil. Vote with your conscience, and remove this corrupt and broken president from office."
Criticism of Zuma from within the African National Congress (ANC) has grown amid multiple corruption scandals and mounting economic woes, and the celebrated party of Nelson Mandela has declined sharply at the polls.
But senior ANC leaders and most analysts believed Zuma would survive the vote given the party's large parliamentary majority.
"We are not sell-outs... we will vote for the ANC. The ANC rejects this motion with the contempt it deserves," deputy chief whip Doris Dlakude said in reply to Maimane's attack.
Also read: How Uhuru and Ruto secured re-election
Several opposition parties led thousands of anti-Zuma protesters outside the national assembly, while supporters of the president held a rival march.
Zuma, who has built up a network of loyalists in the ANC since coming to power in 2009, has survived several previous parliamentary votes that were held without secret balloting.
Baleka Mbete, the speaker of parliament, made a surprise decision on Monday to hold the ballot in secret after a campaign by the opposition who hope to encourage ANC members to vote against their leader without fear of intimidation.
"Mbete's decision was made knowing that Zuma will be secure," Darias Jonker, of the New York-based Eurasia political analysis consultancy, said.
"The vast majority of ANC MPs are not willing to risk the stability of the party in order to remove Zuma in this fashion."
Zuma, 75, is due to step down as head of the ANC in December, and as president before the 2019 general election - lessening pressure for his party to trigger imminent change.
The ANC has acknowledged recent criticism of the party, including the impact of a cabinet reshuffle in March when respected finance minister Pravin Gordhan was replaced with a close Zuma ally.