Two young Scandinavian women on a hiking trip in Morocco were stabbed and decapitated at their camp site in the Atlas Mountains in what law enforcement officials said was a terror attack by members of the Islamic State.

The murders of Louisa Vesterager Jespersen, 24, of Denmark and Maren Ueland, 28, of Norway were filmed, and the video recording the attackers made of the incident was released online. The footage showed a blonde woman screaming while a man cuts her neck with a large knife.

One of the women had a severe neck wound, and the other had been beheaded. The pair had been on a monthlong trip and hiking North Africa's tallest peak the day they were killed.

French hikers stumbled upon the horrific scene. One body was found in the open air, and the other was inside a tent. Video of the incident was uploaded to the Internet and shows one of the alleged killers saying, "This is for Syria. Here are the heads of your gods," according to one report.

Police have arrested four suspects in connection with the attack but not shared any additional information about them other than they had connections to the ISIS and had pledged allegiance to the terror group in a video a week before the killings, according to Morocco’s general prosecutor.

"We do not know the circumstances, but a lot suggests that the brutal killing was an act of terror, and there's a video on social media," Danish Prime Minister Lars Lokke Rasmussen said at a press conference Thursday. It's not clear how police were led to the four men in custody.

One report cited local residents from near Mount Toubkal who said three "homeless" men had pitched a tent near the women and possibly targeted them while they were sleeping.