THE legality of the Scottish Labour leadership contest has been questioned after Anas Sarwar’s campaign obtained a legal opinion on the mass sign up of supporters by the Unite trade union.

Sarwar’s team received advice from a QC over a recruitment drive that may have led to thousands of Unite members getting a vote in the fractious contest.

However, although a source in the Sarwar camp said the opinion brought the “legality of the process into serious question”, the insider ruled out a court challenge.

Hugh Henry: Scottish Labour's fall from grace started long before the referendum in 2014

A Unite spokesman responded: “This is ridiculous. The Labour party has confirmed time and again that Unite's members have signed up to this election legitimately and in full compliance with the rules. These hints and innuendos are a smokescreen to divert from discussion from the real issues at stake. They only bring the Sarwar campaign into disrepute for effectively trying to exclude trade union members who are entitled to a vote.”

The leadership battle between Sarwar, a critic of Labour leader Jeremy Corbyn, and Richard Leonard, a supporter, has descended into a mud fight over who should get a vote in the contest.

Sarwar supporters are believed to have signed up thousands of new members, but questions have been raised about recruits sharing mobile phone numbers while living at different properties.

Leonard’s camp has benefited from a huge influx of trade union supporters to vote in the contest, particularly from Unite. Sarwar’s side has complained about a text message Unite sent that led to potentially thousands of people becoming eligible to vote.

Labour MP Ian Murray, a Sarwar supporter, wrote to party General Secretary Brian Roy claiming there was “no doubt whatsoever” that the Unite recruitment drive broke party rules. He also warned the election process was being “rigged” to help Leonard, accusations Unite strongly denied.

READ MORE: Left-wing Labour leadership candidate Richard Leonard wins backing of UK's most powerful union boss

One source in the Sarwar camp said: "Given the level of concern raised about Unite’s sign-up process via text message, expert legal advice from a top QC was obtained that significantly strengthened those concerns about Unite’s practices, bringing the legality of the process into serious question.

“But in the interests of party unity, and to allow the campaign to focus on the policy debate that members want, no further action was taken and won’t be taken. Richard’s campaign was, however, privately made aware of the advice.”

A Leonard backer said he feared a narrow victory could see a legal challenge to the result, but the Sarwar insider said this would not happen.

It is understood the legal opinion has not been shared with the Scottish Labour party.

A spokesman for the Sarwar campaign said: “We urge all members and affiliate supporters from our Labour family to vote in this contest. We know that many ordinary members of Unite and other trade unions are backing us because we’re running a positive campaign focused on radical ideas, not personal attacks.”

Pat Rafferty, Unite’s Scottish Secretary, hit back at the criticisms of his union. Addressing Unite’s Scottish Policy Conference in Aviemore yesterday, he said: “Let me make it abundantly clear. Accusations of Unite trying to 'fix' the leadership election are absolutely outrageous and totally unfounded. Unite has broken no rules and has complied with all the requirements laid down to us by the Scottish Labour Party. The party itself has confirmed this to be the case.”

He added that he had a "message" for Murray: "Don’t try and use Unite in an attempt to cover up your own failing campaign for Anas Sarwar.

"Try getting on with your job – instead of backstabbing your leader and resigning from your post. It's people like you who are doing more damage to this party than anything else. It’s not Unite who are rigging the vote! It’s not Unite giving false news stories to the media!"

Meanwhile, former Labour Education Minister Hugh Henry, who is backing Leonard, has delivered a coded attack on Sarwar for sending his children to a private school.

Henry, who was an MSP between 1999 and 2016, said: “It's wrong that parents can still buy privilege in education while our comprehensive system is denied the resources to deliver a first-class education for all.”

He also appeared to have a dig over Sarwar’s family firm not paying the real living wage to all its employees. Sarwar relinquished his multi-million pound shareholding in the firm after this newspaper revealed the wages being offered at United Wholesale (Scotland).

Henry said of Leonard: “He has also been a long-standing campaigner against poverty and inequality. As a trade union organiser he fought against low pay, taking on employers and shareholders who tried to hide behind excuses to avoid paying a living wage.”

Hugh Henry: Scottish Labour's fall from grace started long before the referendum in 2014

Scottish Labour declined to comment on the QC opinion obtained by the Sarwar campaign.

Voting in the contest began on Friday and the result of the election is due to be announced on November 18.