The ringleader and two other terrorist ring members had told the court that they decided to commit the abject terrorist act in Morocco after failing to join the Islamic state abroad.
They confessed to having decapitated the two women and filming the savage act before sharing it online.
The three suspects also explained that the attack was planned locally in Morocco by themselves and another accomplice who backtracked on the day of December 17 when the attack took place.
The first instance court in Sale handed sentences ranging from 5 to 30 years to other defendants on terrorism related charges and connections to the main suspects.
The court ordered the four main convicts to pay compensation worth 2 million dirhams to the Norwegian victim but rejected a request of the Danish victim to hold the state accountable for paying the compensation.
The terrorist attack is the first since a bombing in Marrakech left 17 dead in 2011.