The suspected leader of a jihadist cell has told a Moroccan court that he beheaded one of two Scandinavian hikers murdered in the High Atlas mountains.
Louisa Vesterager Jespersen, 24, from Denmark, and Maren Ueland, 28, from Norway, were found beheaded in an isolated area in December.
Abdessamad Ejjoud, a 25-year-old street vendor, told the court: "I beheaded one of them... I regret it."
He and 23 other alleged Islamists are on trial in Salé, near Rabat.
Three of them - Ejjoud, Younes Ouaziyad, 27, and Rachid Afatti, 33 - are accused of pledging allegiance to the Islamic State (IS) group and carrying out the killings. They could face the death penalty if found guilty.
The identity of Ejjoud's victim was not made clear.
The three are the only ones directly accused of carrying out the murders. All 24 defendants face various terrorism charges.
The bodies were found on 17 December in an isolated area near Mount Toubkal, Morocco's highest peak, and a popular destination for hikers.
The women - flatmates at Norway's Bo University - were on a Christmas camping trip and were studying to become tour guides.
A video appearing to show the beheading of one of the women was shared widely on social media by IS supporters.
Police in Norway have said that video is almost certainly real. In Denmark, charges have been brought against 14 people suspected of sharing the footage.
In court, Ejjoud said: "We loved Islamic State and prayed to God for it."
Morocco's anti-terror chief, quoted by the AFP news agency, said the group was inspired by IS but had no contact with IS militants in combat zones.
Read more about the Islamic State group:
In the video, one of the militants refers to "the enemies of Allah" and claims the murders are revenge for the killings of jihadists in Syria.
The 24 suspects are Moroccans from deprived areas of Marrakesh, except for Kevin Zoller Guervos, a Spanish-Swiss Muslim convert.
Morocco has had a moratorium on executions since 1993, but death sentences are still occasionally handed down.
The families of the victims and their lawyers are not attending the trial, AFP reports.
The women's bodies were found in their tent.
Both had taken full precautions ahead of their trip, Ms Ueland's mother said last year.
French media report that Ejjoud served a prison sentence in Morocco for trying to join IS in Syria, and was released in 2015.
He told the court that "I got to know lots of people in prison", but "I didn't indoctrinate anyone - each one knew what he was doing".
He had sold orange juice outside mosques in Marrakesh, before becoming an imam. "I decided to make jihad here", he said, "by targeting foreigners".
The trial resumes on 13 June.