A laptop and phone found in the bedroom of a man on trial for terrorism offences had images of sexual activity with mutilated women in a folder named ‘dead girl pics’, a court has heard.

The images included photos of women who were believed to be dead, with parts of their bodies missing, including their breasts and heads.

Some of the photos showed signs of sexual activity with the corpses.

The devices are said to belong to Sam Imrie, who is on trial at the High Court in Edinburgh for posting statements on the social media platform Telegram suggesting he was going to carry out an attack on the Fife Islamic Centre in Glenrothes.

The 24-year-old has also been accused of planning to stream live footage of “an incident”, and of taking, or permitting to be taken or made, indecent photographs of children.

Giving evidence on Monday, Robert Steer, 51, a cybercrime leader in digital forensics for the police, told the court the laptop and phone had 78 files showing deceased women that he believed were “genuine” photos, some of which were taken at a morgue.

He said several of the images were “distinct” showing sexual activity with the corpses.

Jurors heard that 67 images of child exploitation were also found on the accused’s phone.

Mr Steer said there were 17 photos classed as category A under the UK’s child abuse image database (CAID), which involves photos showing penetrative sex or sadist acts with an animal or a child.

There were also eight images under category B and 42 under category C.

Category B involves images involving non-penetrative sexual activity with a child, while category C relates to “other indecent images” that could include children “sexually posing”, Mr Steer said.

Among other charges, Imrie is accused of being in possession of neo-Nazi, antisemitic and anti-Muslim material.

Professor Matthew Feldman, who is a director at the Centre for Analysis of the Radical Right – the biggest research unit on the radical right, gave evidence at the trial on Monday.

He is a specialist in extreme right-wing groups and claims “an overwhelming bulk” of material found in Imrie’s bedroom during a police search is recognised as “the violent end of neo-Nazism” content.

On the same computer recovered from Imrie’s bedroom there was a folder called “Hero’s”, which had sub-folders including one named Anders Breivik and another after Brenton Tarrant, both convicted of terrorism offences.

Inside the folders were memes and photoshopped images portraying the killers as martyrs and saints and a “tribute” video celebrating Breivik’s actions.

One photo of Breivik in the file had the words “pretty cool guy” and “became a national hero” added to it.

Another image had a photoshopped image of Tarrant surrounded by smiling dogs with guns captioned: “Me and the boys on our way to the nearest mosque.”

The computer folder also contained files named after Dylan Ruth, John Ernst and Robert Bowers who all launched attacks on places of worship and were celebrated in a similar vain through edited images, the court heard.

Jurors heard Ruth shot dead nine churchgoers in South Carolina, while Ernst killed one person during an attack on a synagogue in California and Bowers killed 11 people at a synagogue in Pittsburgh, Pennsylvania.

On Thursday, the High Court in Edinburgh heard a recording of an interview carried out with the accused by police on July 8 2019.

The accused told police he was a “white nationalist”. Asked what that meant, he replied: “It means I care about my race.”

Imrie denied that he thought white people were superior to non-whites, saying he believed the Chinese were superior.

He made no response when it was put to him that that view “flies in the face of white nationalism”.

Jurors previously heard how the accused made a series of derogatory remarks about minority groups on the messaging app Telegram.

Imrie blamed his actions on alcohol.

When asked about his visit to the Fife Islamic Centre in July 2019, which he had threatened to burn down on the Telegram app, Imrie said: “It was a joke.”

He denies all of the nine charges against him, three of which come under the Terrorism Act.

The trial, before Lord Mulholland, continues.