Police searches were carried out at the homes of all four defendants
Plans to set up a secret Islamist state in Scotland were discussed by two supporters of jihad, a court has heard.
The pair said it could provide a safe haven for those who felt "oppressed", London's Blackfriars Crown Court heard.
Aabid Khan, from Bradford, West Yorkshire, said the only problem was the availability of weapons, the court was told.
The 23-year-old and three others deny terrorism-related counts of possessing articles or documents.
In the dock are Mr Khan and Sultan Muhammad, 23, also from Bradford, Ahmed Sulieman, 30, from Woolwich, south-east London, and Hammaad Munshi, 18, from, Dewsbury, West Yorkshire.
Jurors heard the state would also be run according to Sharia law and eventually be used as a base to "discreetly train" for attacks against non-believers.
The court heard the online exchange was part of a "mass" of allegedly incriminating material found by police during a series of swoops in Bradford and London two years ago.
Prosecutor Simon Denison said the MSN exchange between Khan and Muhammad about the secret Islamic state in Scotland occurred on 12 November 2005.
He said it began with Mr Muhammad explaining how he and work colleagues had allegedly been chatting about "hijrah" or emigration for Muslims feeling oppressed in Britain.
He then continued: "So like maybe a remote part of Scotland - people were like 'What the hell?' - at least to a place where there were Muslim communities."
Mr Khan is said to have replied: "A group of Muslims can go to a remote place and set up a mini Sharia state and they can rule according to Sharia law, like this and stay there, building them up and their children up, preparing for fitness, and then launching jihad once they strengthen themselves."
Mr Denison claimed he then added: "In the UK you can isolate with a group discreetly and train, but better in the US as they have weapons there. Over here weapons is problem."
All defendants deny possessing articles or documents likely to be useful to terrorists in 2005 and 2006.
Mr Khan and Mr Muhammad also deny possessing articles for a terrorist purpose.
The trial continues.