Ken Livingstone, the former mayor of London, has announced he is to quit the Labour party.
Livingstone has been suspended since 2016 following a row over comments he made about Adolf Hitler and Zionism.
The row escalated in dramatic fashion over the course of a single day, when a series of confrontations left him trapped in a toilet with a press pack outside.
Shami Chakrabarti, the shadow attorney general who led a controversial review into anti-Semitism within the Labour party, had said earlier this year that he should not be allowed to remain in the party.
In a statement, Livingstone said: "I do not accept the allegation that I have brought the Labour Party into disrepute – nor that I am in any way guilty of anti-Semitism. I abhor antisemitism, I have fought it all my life and will continue to do so.
"I also recognise that the way I made a historical argument has caused offence and upset in the Jewish community. I am truly sorry for that."
He told the BBC that he was quitting as if he lost his case and was expelled, it would take another two years for a legal challenge to be resolved.
Jeremy Corbyn, the Labour leader, said: "Ken Livingstone’s resignation is sad after such a long and vital contribution to London and progressive politics, but was the right thing to do."
Livingstone's resignation was accepted positively by left-wing commentator Owen Jones.
Other party members, however, were less positive about the events leading up to this point.
Jewish leaders had demanded Livingstone be expelled from the party by July, when they are due to hold a second meeting with Corbyn over anti-Semitism within the party.