BEST-SELLING author Janice Galloway has expressed frustration as a sheriff judgement revealed her ex-lover was released on stalking charges 13 days after behaviour that would have normally led to compulsory hospital detention.

Concert pianist Graeme McNaught walked free from court in October despite being found to have acted in a threatening and abusive manner towards her.

Six months later, another sheriff decided to make no order over separate charges as psychiatrists said McNaught had shown no evidence of symptoms of mental disorder after treatment.

In a detailed transcript of that judgement, Sheriff Marie Smart said the jury was satisfied that when he had committed the acts he was "not criminally responsible for them due to suffering severe mental illness".

However, Sheriff Smart's judgement also reveals that 13 days before the October ruling, unknown to those in charge of his care, he had made an "impulsive decision" to resign his post in the piano department of the Royal Conservatoire of Scotland which he had held for 24 years.

And in a development that has stunned Ms Galloway, the sheriff said that Mr McNaught's psychiatrist acknowledged that had she been aware of his decision to resign and a failure to take medication, she would have arranged to have had him compulsorily detained in hospital for treatment.

The sheriff said: "No action more clearly highlights the extreme decline in your mental health than your decision to resign your post. It is obvious you were in no fit state to make any rational decision at the time far less one so momentous."

Ms Galloway, author of novels such as The Trick is to Keep Breathing, Foreign Parts and Blood, said: "The whole thing is messed up. The real oddity about it all is the way none of this is joined up when some crimes, particularly stalking, require a history to make any sense at all."

She earlier called for a shake-up of the legal system after Mr McNaught, 55, was freed with no order imposed on May 1, 30 days after being acquitted of stalking on grounds of insanity.

In the first case which concluded on October 20, Mr McNaught was found to have carried out the acts after an examination of facts hearing at Hamilton Sheriff Court. But he was not convicted of any offence and faced no court-imposed orders.

The sheriff in the October case had to rely on section 57(2) of the 1995 Criminal Procedure (Scotland) Act which states the court may make a number of orders, including a supervision and treatment order, a compulsion order requiring detention in hospital or a guardianship order.

None of the psychiatric reports submitted recommended the use of a supervision and treatment order or any other section 57 order as he was responding to voluntary treatment.

Anti-stalking campaigners are known to to be concerned at how psychiatrists' reports are carried out in stalking cases.

Sheriff Smart's commentary reveals that when Mr McNaught's brother asked why he was resigning he said he wanted to apply for the post of Head of Strings at the Conservatoire.

When his brother pointed out he did not even play a string instrument Mr McNaught is said to have replied that pianos had strings.

Sheriff Smart said he was at the time "using social media in a reckless manner and you gave an interview to the press, which you would otherwise consider unwise and untrue". She said he had limited recollection of those events.

Mr McNaught told The Herald on October 21, the day after he was freed, that he had visited Ms Galloway's home near Uddingston the previous day to deliver a brown envelope containing a pink A4 sheet "offering friendship" and then left in a taxi.

The incident formed the basis of one of the fresh stalking allegations against him.

Four days after he walked free in the October case, Mr McNaught was detained on fresh charges and a police officer described his behaviour as "delusional".

He was detained in HMP Addiewell until his admission to Stobhill Hospital on November 7, 2014 to assess and treat his illness.

In deciding to make no order in the latest case, Sheriff Smart told Mr McNaught: "Your mental state is stable and you have been reliably taking your medication."