The mayor of South Africa's second city of Cape Town resigned on Wednesday, amid a bitter dispute roiling the country's main opposition in the runup to 2019 elections.
Patricia De Lille vowed she would vacate her office at 7 pm (1700 GMT), ending uncertainty about her future following several conflicting statements.
The 67-year-old had first announced in August that she would step down at the end of October but appeared to backtrack in recent weeks.
She also announced her resignation from opposition Democratic Alliance (DA), which had tried unsuccessfully in recent months to strip her of her membership.
"I can no longer stay in this abusive relationship. When people abuse you, you must walk away," she told reporters.
"It's my long walk to freedom... I'm free, free from oppression," she said, describing the DA as "rudderless" and "leaderless".
De Lille signed her resignation letter in front of television cameras outside the High Court in Cape Town where she was lodging an application against what she called a "politically-manipulated" forensic report ordered by the municipality which has accused her of maladministration.
The DA welcomed her resignation and said she will be replaced as interim mayor by provincial minister for community safety Dan Plato, 57.
De Lille's seven-year tenure has been marred by allegations of corruption and financial mismanagement that have threatened to tarnish Cape Town's reputation.
The coastal city, one of South Africa's prime tourist destinations, has been battling a drought and a high crime rate.
Cape Town is the DA's flagship city as the first the opposition wrested from the ruling African National Congress (ANC) in 2009 and is one of three major cities under its administration.
The troubles pose a threat to the party's popularity nationwide just months ahead of the general election due in the first half of 2019 when the DA faces a revived ANC following the departure of scandal-tainted Jacob Zuma.
(With inputs from agencies.)