A man has admitted posting online messages in support of the so-called Islamic State (IS) and their terrorist acts.
Algerian citizen Mourad Mosdefaoui, 34, who is thought to have entered the UK in 2008, put three such posts on social networking site Facebook from September 2014 to March 2015.
In one, he is shown in a photograph to be holding a notepad with Arabic text, translated as: "The Islamic State will remain and expand God willing."
In another, he wrote he was troubled to be "living in a country of blasphemy" and appeared to suggest he would be willing to fight in Iraq and Syria.
Officials later found more than 11,000 images on a mobile phone in his possession, a number of which were said to depict imagery and propaganda associated with IS, including images appearing to show a beheading carried out by the man known as Jihadi John.
A search of Mosdefaoui's Edinburgh flat this summer also uncovered a forged Belgian identity card, which he admitted owning in order to find work in the UK.
Details of the offences were revealed at Edinburgh Sheriff Court today, where Mosdefaoui pleaded guilty to two charges - one under the Terrorism Act 2006 and one under the 2010 Identity Documents Act.
Sentencing was deferred until next month.
Narrating the circumstances of the case, procurator fiscal depute Calum Darling told the court: "The messages posted by the accused celebrate the terrorist acts of the Islamic State of Iraq and the Levant.
"The messages amount to encouragement of support for a proscribed group and may be inferred to encourage acts of terrorism generally."