UK Government legislation designed to stop illegal immigrants from renting properties will not be rolled out in Scotland after the High Court found it to be in breach of human rights laws.

The “right to rent” rules, introduced to England in 2016, required landlords to assess the immigration status of tenants.

Judge Martin Spencer ruled the scheme, contained in the Immigration Act 2014, is incompatible with the right to freedom from discrimination.

READ MORE: Fears 'toxic' Right to Rent scheme could bring discrimination to Scotland

He also ruled that a Government decision to commence the scheme in Scotland, Wales or Northern Ireland without further evaluation would be "irrational" and breach equality laws.

The judge said the rules were "intended to bite, and bite hard, on landlords" in order to be effective, but it appeared they had not had this effect and therefore, if anything, the Government would be inclined to tighten, rather than relax the scheme.

He said: "I would conclude that, in the circumstances of this case, Parliament's policy has been outweighed by its potential for race discrimination.

"As I have found, the measures have a disproportionately discriminatory effect and I would assume and hope that those legislators who voted in favour of the scheme would be aghast to learn of its discriminatory effect."

The judge said the scheme had not been effective in its main aim of controlling immigration.

He added: "Even if the scheme had been shown to be efficacious in playing its part in the control of immigration, I would have found that this was significantly outweighed by the discriminatory effect.

"But the nail in the coffin of justification is that, on the evidence I have seen, the scheme has had little or no effect and ... the defendant has put in place no reliable system for evaluating the efficacy of the scheme.

"In these circumstances, I find that the Government has not justified this measure nor, indeed, come close to doing so."

The legal challenge was brought by the Joint Council for the Welfare of Immigrants (JCWI).

Chai Patel, legal policy director for the JCWI, said: "There is no place for racism in the UK housing market.

"Now that the High Court has confirmed that Theresa May's policy actively causes discrimination, Parliament must act immediately to scrap it.

"But we all know that this sort of discrimination, caused by making private individuals into border guards, affects almost every aspect of public life - it has crept into our banks, hospitals, and schools.

"Today's judgment only reveals the tip of the iceberg and demonstrates why the hostile environment must be dismantled."

A Home Office spokesman said: "We are disappointed with the judgment and we have been granted permission to appeal, which reflects the important points of law that were considered in the case.

"In the meantime, we are giving careful consideration to the judge's comments."

Rowan Smith, solicitor from law firm Leigh Day which represented the JCWI, said: "This judgment is a resounding denunciation of the legality of the Government's flagship hostile environment policy.

"The judge unequivocally came to the conclusion that, where a Government scheme causes discrimination carried out by a third party, human rights law holds the Government responsible.

"The Home Secretary is now in the extremely unattractive position of having to find excuses as to why such obvious race discrimination is somehow justified on appeal.

"In declaring the scheme unlawful, the judge invited the Government to re-think the scheme.

"I strongly urge the Home Secretary to instruct his colleagues in the Home Office to do so immediately."