Cape Town mayor Patricia de Lille. PHOTO: Phandulwazi Jikelo/ANA Photo

Cape Town Mayor Patricia de Lille on Thursday survived a motion of no confidence against her by her own party, the Democratic Alliance, (DA) by a single vote.

The motion was defeated by 110 votes to 109, with three abstentions.

This result comes after De Lille headed to the Western Cape High Court this week for an urgent application seeking to have the vote of no confidence in her conducted by secret ballot.

Cape Town mayor Patricia de Lille leaves council chambers ahead of a motion of no confidence vote on Thursday. VIDEO: Tracey Adams/ANA Photo

The opposition African National Congress (ANC) rejoiced in the chamber as the news of De Lille's narrow victory emerged.

Afterwards, De Lille tweeted: "Thank you to the councillors for their support. You showed your courage and conviction. Let’s get back to our work!"

De Lille earlier walked out of the council sitting when its speaker Dirk Smit refused to allow the secret ballot.

De Lille's legal team argued on Wednesday that a secret ballot was the only way to protect councillors from DA bosses who they feared might intimidate or even fire those who voted against the motion.

Members of the opposition ANC in the the Cape Town council rejoice as a motion of no confidence in Mayor Patricia de Lille, brought by her own party the DA, fails on Thursday. VIDEO: Tracey Adams

The court had left the final decision in the hands of the Speaker but despite Smit ruling that the vote not be held in secret, De Lille managed to survive the motion. 

The grounds of the no-confidence motion were based on the allegations of maladministration and corruption against De Lille.