Three men have been sentenced to death by a court in Morocco for murdering two Scandinavian women hiking in the Atlas Mountains.

A fourth suspect who fled the scene was given life in prison.

After several hours of deliberation, the court handed 19 accomplices jail terms ranging from five to 30 years.

None of the men reacted as the sentences were read out but families of those convicted rushed out of the crowded courtroom in Sale crying.

Morocco Tourists Killed Trial
Lawyers gather inside the courtroom before the sentencing (Mosa’ab Elshamy/AP)

Maren Ueland, 28, from Norway, and Louisa Vesterager Jespersen, 24, from Denmark, were stabbed to death in December. The murders were recorded on video and posted online.

The men claimed allegiance to the Islamic State group.

All 23 addressed the court ahead of the verdicts, with most begging for leniency.

The main defendants asked Allah for forgiveness. Jounes Ouzayed and Rashid Afatti are carpenters while Abdessamad Al Joud is a street merchant. The man who fled the murder scene is Khaiali Abderahman.

In his closing arguments in June, the prosecutor asked the court to sentence the key suspects to death, and described the three main defendants as “human beasts”.

A Swiss man, Kevin Zoller, who was among the accomplices, received a 20-year sentence.

A lawyer for Ms Vesterager’s family said he was “100% satisfied” with the verdicts.

Khalid El Fataoui noted that Ms Vesterager’s mother had asked the court in a letter at an earlier hearing this month to sentence the killers to death.

“We obtained what she asked for.”