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.
Speaking in April 2016, Mr Livingstone, who was defending MP Naz Shah over claims she had made anti-Semitic social media posts, said: “When Hitler won his election in 1932, his policy then was that Jews should be moved to Israel. He was supporting Zionism before he went mad and ended up killing six million Jews.”
Despite his decision to resign from the party, Mr Livingstone said on Monday he “did not accept” the allegation that he was “in any way guilty of anti-Semitism”.
He added that 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,” he said in a statement. “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.”
A spokesman for the Campaign Against Antisemitsm said Mr Corbyn’s decision to describe Mr Livingstone’s resignation as “sad” had merely “rubbed salt into the wound”.
The group called for Mr Corbyn to apologise and added: “The Labour Party’s anti-Semitism problem seems to be growing, not receding.”
Speaking later on BBC Radio 5 live, Mr Livingstone said his decision had come after he was warned “some of the old right wingers” in Labour’s National Executive Committee had again been planning to call for his expulsion from the party.
Labour MP Ruth Smeeth described Mr Livingstone’s decision to resign as “welcome” but added his “toxic views” should have resulted in his expulsion from the party “years ago”.
Ilford North Labour MP Wes Streeting added: “We must now make it clear that he will never be welcome to return.”
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 editor Laura Kuenssberg said Mr Livingstone’s departure from the party would be a relief to Mr Corbyn.
“Mr Corbyn wants people to believe that he is taking anti-Semitism seriously. While Mr Livingstone was still a member that was challenging to say the least,” she said.
“Although he and Mr Corbyn were fellow political travellers for years, he had long passed the point of being helpful to his old friend.”
Ken Livingstone’s statement in full
“After much consideration, I have decided to resign from the Labour Party.
The ongoing issues around my suspension from the Labour Party have become a distraction from the key political issue of our time – which is to replace a Tory government overseeing falling living standards and spiralling poverty, while starving our schools and the NHS of the vital resources they need.
We live in dangerous times and there are many issues I wish to speak up on and contribute my experience from running London… from the need for real action to tackle climate change, to opposing Trump’s war-mongering, to the need to end austerity and invest in our future here in Britain.
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 anti-Semitism, 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.
Under Labour’s new general secretary I am sure there will be rapid action to expel anyone who genuinely has anti-Semitic views.
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.
We desperately need an end to Tory rule, and a Corbyn-led government to transform Britain and end austerity.
I will continue to work to this end, and I thank all those who share this aim and who have supported me in my own political career.”