The court also heard that, in 2017, Friel brought a knife into Edinburgh College where he was a student at the time. Former classmate, Jordan Wilson, gave evidence that Friel told him not to come into college that day because “there will be an attack.”
He told the court that he saw Friel outside the college carrying his backpack and asked for an explanation for the messages.
"He replied he had been bullied online, I think, and he was going to hold someone hostage in the cafeteria that day," said Mr Wilson.
"He showed me a kitchen knife he had in his bag," said the office worker.
Mr Wilson later told police that Friel said he was planning to attack the cafeteria with a knife he had brought.
Mr Wilson said he panicked and did not know how to react. Friel went to a toilet and he walked out the doors of the college and saw a classmate before returning to the building and police were contacted.
Police Constable Mark McNulty was one of the officers who responded. He told the court that Friel had pulled out a kitchen knife and, as he brandished it above his head, one of his colleagues suffered a laceration to his shoulder.
Following Friel’s arrest over this incident, he was an inpatient at the Orchard Clinic secure unit at the Royal Edinburgh Hospital and was released into the community in June 2018
Defence solicitor advocate Brian Gilfedder asked Dr Quinn if during the meeting with Friel last year he was concerned that he might be facing a repeat of the college incident where by threatening to cause harm or actually causing harm to the public he would be shot by the authorities. Dr Quinn said: "That was my concern."
The psychiatrist said that during the interview with the former inpatient things were coming up that he was a risk with him talking about previous acts by other people and the purchase of equipment. Friel told him he bought body armour and had been shopping for a crossbow.
Terrorism charges
Friel is alleged to have committed two offences under terrorism legislation between June 1 and August 16 last year at the Grindlay Court Community Justice Social Centre, the Royal Edinburgh Hospital and at his home in Comely Bank Road and elsewhere in Edinburgh.
He is accused of possessing the crossbow, scope, 15 crossbow bolts, the machete and ballistic vest in circumstances giving rise to reasonable suspicion that his possession was for a purpose connected with "the commission, preparation or instigation of an act of terrorism".
It is also alleged that with the intention of committing acts of terrorism he conducted online research in an attempt to acquire a firearm, over spree killing mass murders and "in particular spree killing mass murders committed by individuals expressing motivation from or affiliation with 'incels' (involuntary celibates).”