Maren Ueland and Louisa Vesterager Jespersen were found dead at a campsite in Morocco's Atlas Mountains last year; footage of their murder later spread online.

Three men accused of beheading two female backpackers in Morocco last year have been sentenced to death for their crimes.

A Moroccan court convicted Jounes Ouzayed, Rashid Afatti, and Abdessaman Al Joud on terror charges on Wednesday, The Associated Press reports. The three men were accused of killing Maren Ueland, a 28-year-old Norwegian student, and Louisa Vesterager Jespersen, a 24-year-old Danish student, in December and filming it for social media.

A fourth defendant who allegedly fled the scene of the murder, Kahiali Abderahman, was sentenced to life in prison, while 19 other accomplices were sentenced to spending anywhere between five and 30 years in jail.

The two women, who reportedly attended the same university, traveled to Morocco for a month-long trip on Dec. 9 and were camping in the Atlas Mountains, a popular tourist destination, when they were killed. French hikers discovered their bodies on Dec. 17 near their campsite, according to the BBC.

Al Joud, 25, and Ouzayed, 27, are believed to have been the ones to behead the two students, Fox News reports. Afatti, 33, is alleged to have filmed the killings. All three are alleged to have pledged their support to ISIS in footage filmed before the murders. The footage was then shared online with other supporters of the Islamic State.

However, authorities have described Al Joud, Ouzayed, and Afatti as "lone wolves" who did not have contact with or help from ISIS leaders, according to Newsweek.

Al Joud, believed to be the leader of the group, admitted in court earlier this year to beheading one of the women, according to the New York Post. Ouziyad also admitted to murder, while Afatti confessed to being the cameraman, the outlet reports.

The three men's deaths would mark the first executions in Morocco since 1993, when a country-wide moratorium on capital punishment was enacted, according to the BBC.

Khalid El Fataoui, the lawyer representing Vesterager Jespersen’s family, said that he was “100% satisfied” with the conclusion of the case, Fox News reports. Vesterager Jespersen’s mother pushed for the death penalty in a letter read to the court earlier this year, Fataoui said, explaining, “We obtained what she asked for.”