Image copyright PA Image caption The leadership contest is a two-way fight between Jeremy Corbyn and Owen Smith

Labour is challenging a High Court ruling giving recent members a vote in its leadership contest, with the appeal hearing expected on Thursday.

The party lost a legal challenge to its rules banning anyone who joined as a member after 12 January from taking part unless they paid an extra £25.

Shadow chancellor John McDonnell said Labour's appeal was "disappointing".

The party said it would defend the right of its governing NEC "to uphold the rule book".

The court's decision, handed down on Monday, could add between 126,592 and 150,000 people to the list of those eligible to vote in the contest - according to different estimates.

The ruling is thought likely to benefit leader Jeremy Corbyn over challenger Owen Smith, who earlier branded Mr Corbyn "useless" and said he had "fractured" the Labour Party.

Mr Corbyn, speaking in Bristol, where he is attending a campaign rally, said: "The judge seemed very clear that his decision was all members of the party should have a right to vote in the leadership contest. Surely that has to be the right decision."

A Labour spokesman said: "The Procedures Committee of the NEC has decided that the Labour Party will appeal [against] this ruling in order to defend the NEC's right, as Labour's governing body, to uphold the rule book, including the use of freeze dates."

Mr Smith is calling for the leadership contest - due to end on 24 September - to be extended "so that all members have the opportunity to engage with Jeremy and me before making their choice".

Media playback is unsupported on your device Media caption Owen Smith on Labour Party ruling

Media playback is unsupported on your device Media caption John McDonnell on Labour Party ruling

Mr McDonnell, who is running Mr Corbyn's re-election campaign, claimed the decision to appeal had been taken by a "small clique" that opposed the Labour leader and warned it could cost the party "hundreds of thousands of pounds".

It was "an attack on the basic democratic rights of members in our party", he said.

Mr Smith said it was up to the NEC to decide whether to appeal and it was not right for Mr McDonnell, or himself, to "interfere" in its decisions.

But he added: "Whatever the rules are I am just going to play by them and continue to make my case and at the end of this I am confident that I can persuade the Labour Party that I am the right man to lead us."

Analysis

By political correspondent Iain Watson

The judge was unequivocal - the five Labour members who had claimed they had been disenfranchised in the leadership contest had "wholly succeeded" in establishing their right to vote.

But the implications aren't as clear cut.

Certainly it's an administrative nightmare for Labour officials - they will have to send out something in the region of an extra 125,000 ballot papers in the next two weeks, unless the party wins its appeal on Thursday.

But the key question is: Who benefits if the newer members are allowed to vote?

The widespread assumption is that they are likely to be more sympathetic to Jeremy Corbyn - joining to help rescue his beleaguered leadership.

That's why a narrow majority of Labour NEC members introduced the six month rule at a controversial meeting in July when the leader had left the room.

But many of the "disenfranchised" are likely to have registered subsequently as supporters, gaining a vote by this route.

Owen Smith says he is happy with the outcome but the fact that the ruling was welcomed most warmly and swiftly by those close to Jeremy Corbyn is a big clue as to which side sees this as a victory.

The five members that brought the legal challenge argued the ban amounted to a breach of contract, saying they had "paid their dues" for a right to vote.

The High Court case was triggered after the NEC decided that full members could only vote if they had at least six months' continuous membership up to July 12 - the "freeze date".

But the party offered a window from 18-20 July when they - and non-members - could pay £25 to become "registered supporters" and gain the right to vote.

Labour leadership election timetable

22 August: Ballot papers start to be sent out in the post (Labour Party members only) and by email

21 September: Midday deadline for ballot papers to be returned

24 September: The result will be announced at a special conference in Liverpool

Delivering his judgement, Mr Justice Hickinbottom said: "For the party to refuse to allow the claimants to vote in the current leadership election, because they have not been members since 12 January 2016, would be unlawful as in breach of contract."

The judge said at the time each of the five joined the party "it was the common understanding" that they would be entitled to vote in any leadership contest.

Kate Harrison, solicitor for the claimants said it was "a good day for democracy".

She said that under the ruling, those who had paid £25 to become a registered supporter could now claim their money back.

Image caption Lawyer Kate Harrison said it was 'a good day for democracy'

It is not known how many of the new members paid extra to get a vote in the contest.

Asked whether they should be refunded if they are allowed a vote after all, a move that could cost the party several million pounds, Mr McDonnell said the NEC "will have to abide" by the court's decision.

Reacting to the ruling, Edward Leir - one of the claimants - said the court's ruling was a "victory for equality and inclusion".

The others in the group - who have been crowdfunded and are seeking to raise £40,000 to cover their legal costs - were Christine Evangelou, Hannah Fordham, Chris Granger and "FM", a new member aged under 18.

Correction 16 August 2016: An earlier version of this story carried an out-of-date graphic suggesting it was not clear if Jeremy Corbyn would automatically appear on the ballot when this matter had already been resolved.