The court has already heard that Mr Adair and his best friend Mr McCrory were both former members of prohibited Loyalist terror organisations the Ulster Defence Association (UDA) and its paramilitary wing the Ulster Freedom Fighters (UFF).

Peace process

They were involved in the Good Friday agreement in 1998 which brought peace to Northern Ireland, and both have been living in Ayrshire for a number of years.

The court previously heard that Mr McVeigh, 27, shared a cell with Mr Duffy at Castle Huntly open prison and was also at Shotts prison when Mr Duffy was there.

He told the court that Mr Duffy was a Republican sympathiser who claimed he was a member of the Real IRA and had talked of hating Mr Adair and Mr McCrory and killing them.

Under cross examination by QC Derek Ogg, Mr McVeigh admitted that he and Mr Duffy were both addicted to the the painkiller tramadol.

Mr Ogg said: "There were times where you took tramadol and would go four or five days without sleep. Any person would be affected by that psychologically - fantasising, talking gibberish," and Mr McVeigh replied: "Yes."

The court heard that Mr McVeigh was arrested on terrorism charges on 23 October 2013.

The operation which led to his arrest involved armed police storming his house while a helicopter hovered above it.

Mr McVeigh was held for five days and charged with conspiracy to murder.

The charge was dropped against him several months later.

Death threat

The court heard that Mr McVeigh came to Scotland after receiving a death threat from the UDA.

Mr Ogg put it to Mr McVeigh: "There are temping reasons for you to say things that would make you a witness rather than an accused."

Mr McVeigh replied: "I just said what I believed to be the truth."

The court heard that at one point Mr McVeigh said to police officers: "If he (Mr Duffy) is the real deal that might put me in danger."

Under-cross examination by Donald Findlay QC, who is representing accused Paul Sands, Mr McVeigh admitted that during a conversation at Mr Duffy's flat on 2 August 2013, which was bugged, he talked of wanting to "blow" British enemies "to hell and back".

Mr McVeigh, who comes from a Loyalist background in Lisburn, Northern Ireland, apologised in court for making the remark.

He denied a suggestion from Mr Findlay that it was highly unusual for prison authorities to place a prisoner with a Loyalist background and one with a Republican background in the same cell.

It is also claimed Mr Duffy and Mr Gorman were allegedly part of a plan to murder the governor of Barlinnie jail Derek McGill in a car bomb attack.