
Ken Livingstone has said he is resigning from the Labour Party.
The ex-London mayor has been suspended since 2016 in a row over allegations of anti-Semitism following comments he made about Hitler and Zionism.
Mr Livingstone said he did not accept he was guilty of anti-Semitism or bringing Labour into disrepute but his case had become a "distraction" for the party and its political ambitions.
Jeremy Corbyn said it was a sad moment but it was the "right thing to do".
Mr Livingstone, an ally of Mr Corbyn, has always maintained that comments he made about the Nazi leader supporting a Jewish homeland when he first came to power in the early 1930 were historically accurate.
In a statement he said he "abhorred" anti-Semitism and was "truly sorry" that his historical arguments had "caused offence and upset in the Jewish community".
"I am loyal to the Labour Party and to Jeremy Corbyn. However any further disciplinary action against me may drag on for months or even years, distracting attention from Jeremy's policies.
"I am therefore, with great sadness, leaving the Labour Party."
Labour MP Ruth Smeeth described Mr Livingstone's decision as "welcome" but added his "toxic views" should have resulted in his expulsion from the party "years ago".
Last week, shadow attorney general Baroness Chakrabarti called for Mr Livingstone's expulsion - signalling to some that the party leadership had now turned against him.
He was awaiting a fresh disciplinary process due to start this week.
Mr Livingstone was expelled from Labour in 2000 after challenging the party's official candidate in the mayoral contest but returned to the fold later.
BBC political correspondent Iain Watson said Mr Livingstone's departure would come as a relief for Mr Corbyn as he will no longer have to answer questions about his former ally's fate.
Our correspondent added that had Labour's disciplinary processes failed to expel Mr Livingstone, the Labour leader would have faced renewed criticism from both Jewish groups and some of his own MPs.