"DANGEROUS and authoritarian" — that's how John Swinney has described Westminster plans to replace the Human Rights Act in a letter to Dominic Raab.

Written in his capacity as Deputy First Minister, Swinney slams Boris Johnson's Tory party as the "real threat" to free speech and democratic debate not the "wokery and political correctness" the Ministry of Justice has cited.

And he says it is "difficult to view the proposals which have now been published by the UK Government other than as a pre-planned and politically-motivated attack on human rights, constitutional certainties and the rule of law".

In the letter, sent also to Scotland Secretary Alister Jack and the leaders of Wales and Northern Ireland, Swinney warns that any attempt to scrap the Human Rights Act for a new UK-wide bill of rights will intrude on devolved competencies.

He said: "The Human Rights Act is, in its current form, woven directly into the fabric of the current constitutional settlement.

READ MORE: Priti Patel's 'anti-refugee' bill could erode devolution, legal expert warns

"Any change to the existing statute would therefore itself be a constitutional matter with specific and direct implications for the exercise of both legislative and executive competence by devolved institutions.

"As such, I am very clear that proposals of this nature would require the legislative consent of the Parliament under the Sewel Convention."

The Human Rights Act was brought in by Labour and it's long been a Conservative pledge to repeal and replace it with alternative legislation.

It enshrines basic rights to a fair trial and freedom from ill-treatment, anti-discrimination protections and measures against unfair interference in private and family life. Its wording is drawn from the post-war European Convention of Human Rights and while the convention is enforced by a court in France which is separate from the European Union, most UK claims are handled in the UK, thanks to the Human Rights Act.

The intended reforms commit to remaining within the European Convention on Human Rights, despite pressure from some Tory figures to withdraw.

READ MORE: Are human rights safe in Scotland if the UK Government plots to 'overhaul' them?

The government says the proposals will also prevent foreign offenders abusing rules around the right to a family life and the Ministry of Justice has said they will mean judges do not have to "blindly" follow rulings from the European court of human rights, and can instetad override them.

A senior source is reported as saying that the UK Government believes free speech and democratic debate has been eroded "whether by wokery or political correctness".

In his letter, Swinney says: "The truth, of course, is that the real threat to free speech and democratic debate in this country comes from those who believe themselves entitled to unlawfully prorogue the UK Parliament in order to prevent democratic scrutiny of their actions.

"A blasé willingness to break international law, ride roughshod over the Sewel Convention, or the serial attempts which have been made to restrict everything from access to the courts to the right to protest are not indicative of a government which has a deep or genuine commitment to fundamental freedoms or the principles on which modern democracies are based."

And he raises concerns about remarks made by Deputy PM and Lord Chancellor Raab in the UK Parliament last week, when he said that "he who comes to equity must come to the court with clean hands". 

Swinney said: "Justice, on that analysis, would appear to be something that should be contingent on the moral standing of an individual – presumably with the government of the day determining the 'social credit score' of each litigant.

READ MORE: Joanna Cherry: Covid saved Dominic Raab from a grilling on the Human Rights Act

"Such ideas represent not just a fundamental misunderstanding of the universal and inalienable nature of human rights; they suggest a dangerous and authoritarian direction of travel which is entirely out of step with the established Scottish and UK conceptions of justice and fairness.

"Establishing facts, determining questions of criminal or civil liability, and dispensing justice, including imposing appropriate punishment where it is merited, are very much the proper functions of our courts. Assessing the subjective moral worth of an individual is not.

"History provides adequate warning of where such a path may lead."

A spokesperson for the Ministry of Justice said: "Our plans for a Bill of Rights will strengthen rights like freedom of speech, while preventing abuses of the system and adding a healthy dose of common sense."