The internal squabble in South Africa’s main opposition party, the Democratic Alliance (DA), over the status of Cape Town Mayor Patricia de Lille is set to continue as the party plans to appeal against court ruling reinstating her membership.

The judge said the DA's termination of her membership was unlawful and invalid because it did not constitute a legal panel to decide on her sacking.

The DA accuses Ms De Lille of maladministration and nepotism. She denies the charges.

Ms De Lille tweeted a picture celebrating her court win.

Ms De Lille will now get back mayoral powers, which were downgraded to a ceremonial role after she was kicked out of the party in May.

Ms De Lille is a veteran politician who was in the Pan Africanist Congress before she formed her own party, Independent Democrats, which then merged with the DA.

She built a reputation for being a strong anti-corruption activist who enjoyed the support of Nobel Peace Prize winners Nelson Mandela and Archbishop Desmond Tutu.