CAPE TOWN (Reuters) - South Africa’s opposition Democratic Alliance (DA) said on Tuesday its national prospects were being hurt by a dispute with the Cape Town mayor, who has refused to step down despite an order from the party that she must go.

Cape Town Mayor Patricia de Lille attends the C40 Cities Women4Climate event in New York City, U.S. March 15, 2017. REUTERS/Brendan McDermid

The DA, which appoints the Cape Town leader through its control of the city council, says Mayor Patricia de Lille has brought the party into disrepute by turning a blind-eye toward corruption at city hall. She denies any wrongdoing and says she intends to stay on and clear her name.

The party says that under its rules De Lille automatically forfeited her membership by indicating during a radio program last month that she planned to quit the party. She says she will go to court this week to fight that decision.

“I will show on Friday that this so-called automatic cessation clause is unconstitutional and it is unfairly applied to me,” De Lille said. “I’ve always maintained that my aim only in this matter was to clear my name.”

A party with roots among white liberals from the anti-apartheid era, the DA elected its first black leader three years ago to widen its appeal among voters, and improved its national credentials by winning control of three major cities in 2016.

It now promotes itself as a liberal alternative to the African National Congress (ANC) which has ruled the country since the end of apartheid. The DA is hoping to build on its success in local elections by making gains in a national election next year.

Its main campaign theme is to oppose corruption, perceived as a weakness for the ANC after years of rule by Jacob Zuma, removed from the presidency this year by the ruling party after years of corruption investigations. Zuma denies any wrongdoing.

But a perception that the DA’s own public officials have tolerated graft in local office has made it harder for the party to capitalize on the ANC’s vulnerability.

Natasha Mazzone, the DA’s deputy federal chairwoman, said in a statement that it was “no secret that the DA has suffered immeasurable damage” over the De Lille affair. “We recognize that we will need to rebuild trust with the voters.”

The mayor survived a previous bid to remove her through a motion of no-confidence brought by the party.

Tinyiko Maluleke, an independent political analyst, said the De Lille saga could affect the DA’s performance in next year’s election.

“The implications of the De Lille action are far wider and likely to be more impactful than just the elections next year. The reputation of the DA has suffered tremendously,” he said.

At local elections in 2016, the DA took control of South Africa’s capital Pretoria and commercial hub Johannesburg, improving its chances to take on the ANC at the national level.

However it now faces a resurgent ruling party under new President Cyril Ramaphosa, who has vowed to root out corruption and boost economic growth in Africa’s most industrialized economy since the ANC named him to replace Zuma.