Scotland could remain a signatory to the European Convention on Human Rights (ECHR) even if Westminster follows through on its threat to withdraw, Scottish Secretary Alistair Carmichael has said.

The Liberal Democrat minister stressed that a proposal to strip European judges of their power to enforce human rights in the UK "is the position of the Conservative Party, it is not Government policy".

Scottish Justice Secretary Kenny MacAskill said the Scottish Government is "deeply concerned" at the Tory plan.

Both men addressed a Law Society of Scotland conference in Edinburgh and mutually applauded former attorney general Dominic Grieve's observation that UK Justice Secretary Chris Grayling has not thought through his proposal to withdraw from ECHR and made a series of factual "howlers".

Mr Carmichael said he did not envisage any constitutional problems if Scotland retained the Human Rights Act but the rest of the UK did not.

"We had that very situation in at least the first two years of the Scottish Parliament when it was subject to the Human Rights Act," he said.

He said Scotland "could end up with a compromise which kept the Scottish Parliament within the European Convention of Human Rights".

But he made clear that any attempt to repeal the Human Rights Act at Westminster "will not happen while Liberal Democrats are in government".

"As a practitioner and as a politician, I have seen for myself the protections that come to our citizens through the ECHR," he added.

"For me the commitment is not just political but personal too.

"The Human Rights Act, and the convention rights more generally, have a central place in Scotland's devolution settlement.

"All actions of the Scottish Government must comply with ECHR and this is something of which I am proud. It is not something of which I am afraid.

"The Human Rights Act is a protected act and cannot be altered or repealed by the Scottish Parliament.

"Any attempt by a future UK government to repeal the Human Rights Act or to withdraw from the convention could have serious implications for devolved government in Scotland, Wales and Northern Ireland."

He said he agreed with Mr Grieve's assessment that Tory plans to strip European judges of their power to enforce human rights contained a series of factual "howlers" and were not properly thought through.

"This proposal rears its ugly head every time an election draws near or Nigel Farage appears on the Conservatives' radar screen," Mr Carmichael said.

"It is one thing to throw some red meat to those on the right, but when the cost of that would be the loss of universal rights in force in UK courts to the benefit of every man, woman and child in this country, then in my view that price is too high.

"It will be for the people of this country to choose who will be in the next UK government, but while there are Liberal Democrats at the Cabinet table we will not allow others to take human rights away from the citizens of this country."

Mr MacAskill said: "I never thought I would find myself agree with and mutually applauding Dominic Grieve, but I thought he spoke very sensibly.

"Equally, I have to say that I saw this coming because when I first spoke to Chris Grayling when he became the Minister for Justice he said to me: 'We are still in ECHR - for the moment'.

"This has been a trajectory that they have been on for some time.

"That is why the likes of Dominic Grieve, who was wiser counsel, have been removed. He said this is not simple or straightforward, nor should we be pursuing it."

Mr MacAskill said ECHR is enshrined in the Scotland Act and insisted that Scotland should not accept this as "diktat forced upon us but something that we are voluntarily signed up to because it is best practice".

"We wish to be up there with European democracies, not marginalised and sidelined alongside Belarus, as I think Dominic Grieve and others have referred to," he said.

"So, we are deeply, deeply concerned. This is not the trajectory that a European democracy should be proceeding in in 2014."

Scottish Ukip MEP David Coburn later told Law Society delegates that the row over the ECHR exposes "the problems with the Human Rights Act".

"I believe that British laws should be decided in Britain by this country, by the House of Commons and also by the Scottish Parliament," he said.

"I do not think they should be decided in Brussels.

"The EU is a hideous behemoth. It is an undemocratic Valhalla for passed-over bureaucrats and it really is a bureaucratic dictatorship.

"The last thing you want is to be shackled to the sclerotic rotting corpse of the EU."