In an e-mail MacGregor described himself as a "proud racist"
A man who threatened to blow up Glasgow Central Mosque has been ordered to undergo a psychiatric assessment.
Neil MacGregor also threatened to kill a Muslim a day until all mosques in Scotland were closed.
At Glasgow Sheriff Court, Sheriff Andrew Mackie told the 36-year-old he appeared to be suffering from mental illness.
McGregor will appear again in four weeks time after being assessed at Murray Royal Hospital in Perth.
MacGregor admitted telephoning and e-mailing Strathclyde Police to make the threats from a flat in Pollokshaws Road, Glasgow, between January and February 2007.
The court heard that the e-mail read: "I'm a proud racist and National Front member.
"We as an organisation have decided to deal with the current threat from Muslims in our own British way, like our proud ancestors.
"Our demands are very small. Close all mosques in Scotland.
"If our demands aren't met by next Friday, we'll kidnap one Muslim and execute him or her on the internet, just like they did to our Ken Bigley."
MacGregor then followed up the e-mail with a call threatening to blow up Central Mosque.
Officers searched the mosque but did not find anything suspicious.
MacGregor was arrested in December last year.
Ordering McGregor to undergo a psychiatric assessment, Sheriff Mackie told him: "It has been clear for some time your mental health has been causing concern.
"This may be related to you having previously served in the forces, although doubt has arisen as to whether you actually served in a combat zone.
"It is necessary to detain you in hospital for your health and safety and for the safety of other people."