A MENTALLY ill Rosyth soldier who threatened to kill Muslims at an Indian take-away has failed to have his conviction for breach of the peace quashed.

Scott Mackay, 33, who had served in Afghanistan, was convinced the Taliban had taken over his local eaterie and headed there with a machete.

On his way to Sizzlers Tandoori Takeaway, on Queensferry Road in Rosyth, he phoned 999 and said that he was going to "behead" the staff.

Police arrived at the scene to detain Mackay and when his Rosyth home was searched it contained army explosives.

He was convicted after a trial at Dunfermline Sheriff Court in April last year but claimed that the sheriff had failed to properly explain to jurors the meaning of the law of insanity.

His lawyers told the Court of Criminal Appeal in Edinburgh that their client had lodged a special defence of insanity ahead of the trial.

During the trial the court heard how Mackay, who had drank a bottle of vodka before making the call, was convinced that staff at Sizzlers were members of a Taliban cell.

He phoned 999 and told the call handler that he was armed with a machete and was a short distance from the takeaway.

He threatened to "behead" the shop workers because he believed them to be Muslims.

Defence solicitor, Brian Black, had told the trial his client had “negative attitudes toward Muslims”.

He said: “His views had arisen as a result of his experiences and operations.”

Mackay was found guilty of acting in a racially aggravated manner on September 20, 2015, by phoning a call handler with Police Scotland, repeatedly swearing, stating that he was armed with a machete and uttering threats of violence and death to Muslims.

He was also found guilty of being in possession of a machete in Queensferry Road, Rosyth.

And Mackay admitted a third charge that on September 21 at his home in Hudson Street, he was keeping explosives, namely flares and pyrotechnics.

He was sentenced in September last year where Sheriff Charles Macnair was told that a restriction of liberty order would almost certainly end Mackay's military career.

The sheriff told him: “This was a serious offence in the street in Rosyth.

"It saw you go out with a machete and you were threatening to kill perfectly innocent members of the public who, partly because of your delusion, you thought were posing a danger but they were not.

“Furthermore, you had in your house explosives which you had removed from the army.

“I’m acutely conscious that this order will involve your discharge from the armed forces.”

He imposed a community payback order with three years’ social work supervision, three years’ supervision under the forensic mental health team and Mackay was ordered not to consume alcohol for three years.

Mackay was also made subject of a restriction of liberty order for 12 months.

Three psychiatrists gave evidence during the trial in Dunfermline – two said the soldier had some insight into his actions and appreciated that what he did was wrong, the third psychiatrist said that Mackay didn’t have any appreciation that his actions were wrong.

His legal team told appeal judges earlier this year that, during Sheriff Macnair’s legal directions, jurors weren’t told in proper terms about the law of insanity.

The jurors were told that if they wanted to acquit Mackay on the basis of insanity, they had to accept that the serviceman didn’t have any appreciation of how wrong his actions were.

The appeal court heard that the sheriff in the case didn’t explain the law properly and misdirected the jury.

However, Lord Carloway, Lord Malcolm and Lord Woolman ruled that the sheriff didn't act incorrectly and upheld the convictions.

In a written judgment issued on Tuesday, Lord Carloway wrote: “This appeal is refused.”