A doctor arrested in a major operation against the New IRA was caught up in a "dirty squabble" between MI5 and dissident Republicans, a court has heard.
A solicitor for Dr Issam Bassalat, 62, made the claim during an unsuccessful bail application.
The Palestinian attended an alleged New IRA leadership meeting in Omagh in July that was bugged by MI5.
He claims he was "misled" into going by an alleged MI5 agent.
Dr Bassalat, of Telford Road, Edinburgh, faces a single charge of preparatory acts of terrorism.
He was arrested at Heathrow Airport last month.
A prosecuting lawyer told Dungannon Magistrates Court that the doctor was part of a plan by the New IRA to source weapons.
He said any suggestion that Dr Bassalat attended the meeting "as an innocent is extraordinary and unbelievable".
Dr Bassalat's lawyer said his client had been "pestered" into going by an alleged MI5 agent, Dennis McFadden.
He told the court: "He discusses Palestinian history. It could have been for any audience.
"At no time does he discuss the importation of weapons or anything overtly military."
He said the accused has provided more than 30 character references stating he is an advocate of non-violence.
The court also heard he had met a co-accused, David Jordan, of Cappagh Road, Dungannon, in Edinburgh in February.
'Currently in hospital'
The prosecution alleges reference was made to "our little project" and getting "the ball rolling again after lockdown".
The court was told Dr Bassalat is currently in hospital and has refused to provide the PIN number for his mobile phone.
Refusing to release him on bail, the judge said: "The nature of the alleged offending and taking note of the prevalence of terrorist offences in Northern Ireland and worldwide, and the nature of those who commit such acts, leads me to find a real risk of further offending."
He also said he considered the accused was a flight risk.