Labour's ruling National Executive Committee (NEC) is facing the threat of legal action if Jeremy Corbyn's name is not on the ballot paper in the forthcoming leadership contest.

The NEC is due to meet to rule on whether Mr Corbyn needs the nominations of 51 MPs and MEPs to stand in the contest triggered by a challenge from shadow business secretary Angela Eagle.

Solicitors acting for Jim Kennedy, a trade union member of the NEC, have written to party general secretary Iain McNicol warning they will take "injunctive action" unless Mr Corbyn is automatically on the ballot.

Read more: Jeremy Corbyn condemns online abuse of hostile Labour MPs

The letter from Martin Howe states: "Our clients are very concerned that the purpose of the special meeting is to manufacture a situation whereby Jeremy Corbyn's name will be omitted from the leadership ballot. That is wholly unacceptable

"Any attempt to keep Jeremy Corbyn's name off the ballot for leader, whilst he remains leader, in light of the current challenge by Angela Eagle (or any other challenger) will be met with legal action for breach of contract, specifically for breach of the 2016 Rule Book Chapter 4 Rule 2Bii.

"We put you on the clearest notice that we will be instructed to apply to the High Court for immediate injunctive relief should Jeremy Corbyn's name not go forward automatically to the ballot."

Read more: Corbyn defiant as Eagle challenges for Labour leadership

The solicitors warn that the case for Mr Corbyn's automatic inclusion on the ballot is "so patent and clear" that they are ready to pursue Mr McNicol personally for costs if he is not.

The NEC has been presented with conflicting legal advice over Mr Corbyn's position, with Labour-commissioned analysis stating that he will need the nominations, but Unite-backed advice from Michael Mansfield QC concluding that he does not because he is a sitting leader.

The battle looks increasingly likely to end up in the courts, with Mr Corbyn vowing to fight any exclusion from the ballot paper but the anti-Corbyn camp weighing up a legal challenge if he is allowed to stand without the nominations.

Meanwhile, a YouGov poll for the Election Data website found the Labour leader's union backing dissolving.

Read more: Corbyn - I'm a Socialist not a Unionist

In the survey of 1,221 trade union members from Unite, the GMB, Unison, Usdaw and the CWU, almost two-thirds (63%) of respondents said he was doing badly as leader compared with a third (33%) who said he was doing well.

More than three-quarters (76%) said it is unlikely that Mr Corbyn will ever become prime minister and more than two-thirds (69%) said it was unlikely Labour would win the next election with him as leader.

The poll is significant as 12 of the NEC seats - around a third - are taken up by union representatives.

Ms Eagle, who has met the nominations threshold, launched her leadership challenge on Monday, promising to make Labour electable again after the "howl of pain" expressed in the Brexit vote by people who felt they had been ignored for too long.

And she insisted it was time for Labour to have a woman leader, amid reports that former frontbencher Owen Smith could launch a rival leadership challenge.

Ms Eagle told Channel 4 News: "The Conservatives have their second woman prime minister.

"The Labour Party, the party of equality who pioneered anti-discrimination - it's about time they had their first elected woman leader."

Meanwhile, deputy leader Tom Watson told a meeting of the Parliamentary Labour Party (PLP) that his abandoned peace talks with union leaders failed to find a way around the impasse between MPs and pro-Corbyn elements of the party.

He said: "For years I've been told I'm a fixer. Well, I've tried to fix this, I've really, really tried, and I've failed. I've tried to find a way forward for the party between two apparently irreconcilable decisions.

"Clearly the vast majority of the PLP has already made it clear they wouldn't countenance a settlement that involved Jeremy staying in place."

Labour's civil war intensified after the EU referendum when 172 of the party's MPs indicated that they had no confidence in Mr Corbyn in a vote in which he garnered the support of just 40 Westminster colleagues.

Unite general secretary Len McCluskey said the party rules were clear that when there was no vacancy for the leadership - as at present - it was the challenger who was required to get 51 nominations.

He said it would be a "sordid little fix" if Mr Corbyn was excluded from the ballot paper.

"I think that it would be alien to the traditions of the Labour Party. It would be alien to the concept of natural justice that Jeremy Corbyn is not automatically on the ballot paper," he told BBC Radio 4's Today programme.

"If Angela or Owen or anybody else wants to challenge Jeremy, that's fine. Jeremy should be on the ballot paper and we should try to conduct the campaign in a civilised manner.

"I will accept the result but I won't accept a fix and that's unfortunately what appears to be developing at the moment, which is deeply regrettable."

Mr Corbyn had been expected to address a Unite conference in Brighton on Tuesday afternoon but a spokesman for the union confirmed that the Labour leader would not now be speaking at the event.

Unite said it "regrets but recognises" that a leadership contest is now likely.

And it restated that Mr Corbyn must be on the ballot paper, adding that any leader elected in a vote from which he is excluded would have "no credibility" with either the party or the country.

The union said any such election would look like a "sordid fix" and be "alien to the traditions of the Labour movement".

In a statement, Unite said: "While we remain of the view that this is an unhelpful process to be embarking upon at this time, we urge all sections of the party to act with dignity and respect for each other as this process unfolds.

"We would urge too, that to assist the party as it moves forward to a contest, that full independent legal counsel is shared with the members of the decision-making body, the NEC, to bring clarity and a common view to this process."

It added: "While it is only right that we all accept the result of a fair election whatever it is, for our party's safe and stable future, we must never accept a fix."