Labour MPs have suffered a serious setback in their attempts to oust Jeremy Corbyn after he secured an automatic place in the upcoming leadership contest.
His opponents had he would be forced to try to win nominations from at least 20 per cent of Labour's MPs and MEPs.
More than 50 members of his shadow cabinet have walked out on him in the the last few weeks.
They are protesting at what they say was his lack of leadership during the European Union referendum.
The party now faces a divisive leadership contest this summer, just 10 months after the last one finished.
Mr Corbyn has earlier threatened to take his own party to court if he was excluded from the ballot.
Last night said he hoped that a court case instigated by his own MPs could be avoided.
The Islington MP said that he hoped “there would not be a legal challenge”.
“I think we are fine,” he added.
He also said that he was "delighted" that he would automatically be a candidate.
But John McTernan, a former adviser to Tony Blair and ex-Scottish Labour leader Jim Murphy, said it was a “terribly, terribly sad day” and that the unions, who supported Mr Corbyn, had “destroyed the Labour party”.
Mr Corbyn was a key “factor” behind the UK voting to leave the EU, he added.
But he predicted that Labour MPs would “fight for every second of every hour of every day to defeat” the veteran socialist.
Labour’s party's ruling national executive committee voted 18-14 that Mr Corbyn would automatically be on the ballot paper.
The decision followed almost six hours of discussion at the party's headquarters in London.
Some Labour MPs had believed that Mr Corbyn would struggle to secure the 51 nominations needed in the wake of the Brexit vote.
Angela Eagle, who at the weekend announced her leadership campaign, said that she welcomed the contest ahead and was “determined to win it".
But the decision makes Mr Corbyn now the favourite in the contest.
More than 100,000 people have joined the party in recent days, most to vote for him as leader.
Speculation is also mounting that the party could eventually split if Mr Corbyn remains in the top job.
As jubilant supporters cheered Mr Corbyn, he told reporters: "I'm sure Labour MPs will understand that the party has to come together in order to present to the British people the options of a different and better way of doing things."
Pledging to campaign "on all the things that matter", he said anyone who had any disagreements should "come and talk about it".
Mr Corbyn said: "I have been elected, last year, 10 months ago today, with a very large mandate. I respect that mandate. It's a responsibility I'm carrying out.
"I would hope there isn't going to be a legal challenge. There's been a very long legal discussion this afternoon. There were very well-qualified lawyers on hand to advise, so I think we are fine."
A Labour spokesman said: "The NEC has agreed that as the incumbent leader JeremyCorbyn will go forward onto the ballot without requiring nominations from the Parliamentary Labour Party and the European Parliamentary Labour Party.
"All other leadership candidates will require nominations from 20% of the PLP and EPLP."
Transport union TSSA said that "good sense" had won out.
General secretary Manuel Cortes said: "I am glad to see cool heads and good sense have prevailed at today's Labour Party NEC and should there now be a leadership contest that Jeremy will indeed be allowed to be on the ballot in accordance with party rules.
"Let's face it, with the Tories united behind Theresa May and our NEC now united behind Jeremy Corbyn it would be better for our members, better for our party and most of all, better for our country, if all sides of the party now come together, agree that we have more in common than that which divides us and work together to deliver a united and effective opposition to Theresa May's Tory government.
"But if there is yet to be a leadership contest, let it be conducted in a comradely manner and we at the TSSA look forward to supporting Jeremy continue to develop and expose his positive programme for the next Labour government."
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules here