Labour’s general secretary Iain McNicol is standing down as Jeremy Corbyn tightened his grip on the party.
Mr McNicol, who has served as the Labour Party’s most senior employee since 2011, said he was leaving to “pursue new challenges”.
He was appointed to the role under the party leadership of Ed Miliband but has clashed with current leader Jeremy Corbyn and his allies.
It is understood that the left of the party has long hoped to oust him.
Mr Corbyn said: “I would like to personally thank Iain McNicol for his long and dedicated service to the Labour Party as general secretary.
“He has run our party’s organisation at a time of great change, including a near tripling of the membership, two general elections and the EU referendum.
“Iain has served the Labour Party and trade union movement in a wide range of roles throughout his career and is a credit to our movement.
“I am confident Iain will continue to play a major role in politics and our party, and will support our team inside and outside Parliament with his experience and skills.”
Mr McNicol angered allies of the Labour leader when they believed he was involved in trying to stop Mr Corbyn being automatically included on the ballot paper after he faced a leadership challenge.
Labour said officers of the party will now meet to decide the process for the election of a successor.
It will give Mr Corbyn a chance to further strengthen his control over party structures.
Mr McNicol said: “It’s been an absolute honour and a privilege to serve as general secretary of the Labour Party. I have now decided to move on to pursue new challenges in the service of the Labour Party and wider labour movement.
“I would like to thank our fantastic staff across the country for their brilliant work and support. A team who continuously go above and beyond to deliver for Labour. It has been a tumultuous seven years including; two general elections, a huge increase in our membership, Scottish and EU referendums.
“It is a hugely exciting time for the Labour Party after we achieved the biggest increase in our vote since 1945 at last year’s general election. I will continue to support Jeremy Corbyn’s leadership and will work closely with him and our whole parliamentary team to take Labour to victory at the next general election.”
He will stand aside once a successor is chosen.
The Conservative party said Mr McNicol had been toppled after “persistent attempts” by supporters of Mr Corbyn.
A spokesman said: “Iain McNicol’s departure shows once again that Labour are putting their own bitter internal politics before ordinary people and their priorities.”