A high court judge has ruled that the decision by Labour's national executive committee (NEC) to allow Jeremy Corbyn to automatically appear on the party's leadership ballot was the "correct" one.
The ruling paves the way for the leadership contest to go ahead. It will see current leader Corbyn facing Owen Smith, who was until last month a member of Corbyn's shadow cabinet.
The NEC was "right to conclude that Mr Corbyn was entitled to be on the ballot paper without the need to obtain any level of nominations", according to the written judgment handed down by Mr Justice Foskett.
"That conclusion, which is sufficient to dispose of this case, has not required the re-writing by the court of the relevant provision of the rules and neither has it required any strained meaning to be attributed to those rules."
A summary of the judgment added that "the court's decision was a narrow point of law and was wholly unaffected by political considerations".
Labour's general secretary, Iain McNicol, welcomed the ruling. In a statement following the decision, he said: “We are delighted that the Court has upheld the authority and decision of the National Executive Committee of the Labour Party.
“We will continue with the leadership election as agreed by the NEC.”
Corbyn, who was not in court for the judgment, welcomed the decision and said the hearing had been a "waste of time" that distracted from the job of holding the government to account.
He added: "I hope all candidates and supporters will reject any attempt to prolong this process, and that we can now proceed with the election in a comradely and respectful manner."
The decision followed a one-day hearing at the high court earlier this week after Labour party donor Michael Foster launched a legal challenge against the NEC's decision, which agreed by 18 to 14 votes to let Corbyn appear on the ballot without first seeking support from colleagues.
Lawyers representing Foster, who stood as a parliamentary candidate for the party last year, told the court on Tuesday that Labour's rules provide “no trace of distinction” between a challenger and an incumbent.
Gavin Millar QC argued that the current leader should be forced to seek nominations so as to not give an unfair advantage to any challenger, adding that if the court ruled in Foster's favour, leadership hopefuls, including Corbyn, should be given 48 hours to seek the required 51 nominations.
But lawyers representing both the Labour party and Jeremy Corbyn, who won a battle to appear as a second defendant, argued that the court was being asked to rule on a political matter.
Mark Henderson, representing McNicol, said the judge should not “disturb the decision of the NEC unless the decision was unreasonable".
Corbyn's lawyer, Martin Westgate QC, also said the court should be wary before it made any decision. "The court is being asked to pick a side in a political debate," he argued.
The ruling will be welcomed by Corbyn's team, as many feared there isn't a sufficient number of MPs and MEPs who would give their support for the Labour leader to appear on the ballot paper.
Some of Corbyn's allies, such as Labour's election coordinator Jon Trickett, are already on holiday as parliament has risen for recess, making the task of finding 51 supportive MPs and MEPs harder still.
In a no-confidence motion at the end of last month, only 40 MPs gave their support to Corbyn, and a number of MPs have since said they no longer believe the party can win an election under his leadership.
A separate legal action against the Labour party has also been launched by members who will not be allowed to vote in the upcoming contest because they did not join on or before 12 January. That case will be heard in the first week of August.
Siraj Datoo is a political reporter for BuzzFeed News and is based in London.
Contact Siraj Datoo at firstname.lastname@example.org.
Got a confidential tip? Submit it here.