Labour’s national executive committee (NEC) must have the power to determine who is eligible to vote in a leadership election, depending on the circumstances surrounding the poll, the court of appeal has heard.

The party is appealing against a high court ruling that the NEC was wrong to block 130,000 new members from voting in the leadership election by imposing a retrospective six-month freeze. The case was brought by five new Labour members, with a judgment expected on Friday afternoon.

Clive Sheldon QC – acting for the party’s general secretary, Iain McNicol – told Lord Justice Beatson, Lady Justice Macur and Lord Justice Sales that the party’s rulebook gave the NEC the power to define the eligibility criteria.

The NEC was “the guardian of the constitution” he said. “What we have done is consistent with the rules framework but even if it were not, the NEC still has the power to go against the rules framework.”

However, David Goldstone QC – representing recently joined Labour members Christine Evangelou, Edward Leir, Hannah Fordham and Chris Granger – said members signed up with “an existing contractual right confirmed by the rules to vote in leadership elections”. Prospective members who had phoned and emailed the party to ask if they would have a vote had been told they would, he added.

In his earlier arguments, Sheldon said there was “nothing in the [party] rulebook [that] says a freeze date cannot be retrospective … That is entirely an operational matter which must be left to the NEC to determine because it knows the state of the party.”

The NEC needed to be able to “look at the circumstances that arise and then determine the date,” he added.

Sheldon argued that the rulebook stated eligibility criteria should be defined but did not say what those criteria were. “That rests with the NEC,” he said, adding that the committee “defines the precise eligibility criteria, meaning it fixes the eligibility criteria, it sets the boundaries, it sets the limits for the eligibility criteria”.

Those on the NEC who had opposed the six-month cutoff date had proposed a much closer cutoff of 24 June – the day after the EU referendum, Sheldon said, referring to evidence submitted by McNicol.

The NEC had met on 12 July, so even those who did not want a six-month cutoff had still proposed a retrospective freeze date. Those who had opposed the six-month freeze had still “acted on the assumption they could impose a retrospective freeze date,” Sheldon argued.

Freeze dates have always been applied by the party, McNicol’s evidence said, but before 2015 there had not been the same concerns about “subversion of the process” which had led to the decision to apply a retrospective date to ensure voting members had been committed to the party for at least six months.

Those concerns had arisen in 2015 but by the time it was realised the timetable had already been agreed, McNicol’s evidence continued.

Goldstone said the NEC’s powers were nowhere near as wide as the party’s case claimed. “The powers of the NEC were intended to be used for procedural purposes and the retrospective membership requirement is not a procedural matter,” he said.

The NEC, he added, had the power to set a timetable for the election process, including a freeze date, but that could not be in the past. “That would be a strange sort of timetable,” he argued. “It is to be inserted into the electoral process [in the future].”

Goldstone argued there was a danger if the NEC had sweeping powers for retrospective exclusion and disenfranchisement. “There is a scope for abuse and the rules … should not be construed in a way that makes that possible.”

After arguments from both sides were heard, Lord Justice Beatson said it was “apparent this is an urgent matter, so we will give a decision as soon as we can”. Judgment is expected to be handed down on Friday at 3pm.