Cape Town Mayor Patricia de Lille speaks on her mobile phone outside a court in Cape Town, South Africa June 27, 2018. REUTERS/Mike Hutchings

CAPE TOWN (Reuters) - Patricia de Lille has quit as mayor of Cape Town, she said on Sunday, ending a bitter dispute within South Africa’s main opposition party that has tainted its image ahead of elections next year.

The Democratic Alliance’s (DA) row with de Lille, whom it appointed as mayor through its control of the city council but later accused of turning a blind eye to corruption, has tarnished its reputation ahead of elections next year when it aims to challenge the ruling African National Congress (ANC)

“Now that the DA have withdrawn the charges against me and I have cleared my name, I have decided to step aside,” she told a televised news conference.

De Lille, whose resignation is effective Oct. 31, has been a mayor of Cape Town since 2011, and has a large support base among fellow mixed-race residents of the city.

The DA, which promotes itself as an alternative to the ANC, 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.

However it now faces a resurgent ruling party under new President Cyril Ramaphosa, who has vowed to root out corruption and boost economic growth since the ANC named him to replace scandal-plagued Jacob Zuma.