Two Scandinavian backpackers were hacked to death and one beheaded in what is believed to have been a terrorist attack in Morocco.

Louisa Vesterager Jespersen, 24, from Denmark, and Maren Ueland, 28, from Norway, were knifed and beheaded on camera while camping in the Atlas Mountains.

Their bodies were found on Monday morning.

Footage of the horrifying attack has been shared on social media and has caused outrage in Morocco. The footage shows a blonde woman screaming while a man cuts her neck with what appears to be a sharp kitchen knife.

One of the women was decapitated and the other was found dead with a severe neck wound.

One body was found inside a tent by French hikers and the other just outside.

“It was horrible. They were broken,” one of the French hikers said. “We warned everyone we saw in Imlil not to go up there. I did not want more to see what we had seen...It was a big shock, we’re thinking about it all day. It makes you think about what’s important in life.”

A Norwegian newspaper is reporting four suspects had links to ISIS and had sworn allegiance to the terrorist group.

Police tonight announced three men had been arrested. A fourth man was taken into custody on Tuesday.

In a video circulating on social media a man is heard saying in French: “This is for Syria, here are the heads of your Gods.”

The bodies were found in a remote mountainous region, 10 kilometers from the village of Imlil - often the starting point for treks to Mount Toubkal, North Africa’s highest peak.

Ms Jespersen and Ms Ueland were on a month-long trip in Morocco.

Hotel workers in the Moroccan capital claimed Ms Jespersen and Ms Ueland were staying with three other girls and were spotted with local men before they set off on their mountain trek.

Locals told media before the arrests three “homeless” men had been seen in the area.

One hotelier said: “Three homeless men came from Marrakech and pitched a tent right next to the girls’ tent. The men were not from round here.”

Danish Prime Minister Lars Lokke Rasmussen said at a news conference on Thursday the deaths were a “beastly crime”.

“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.”

In Norway, Prime Minister Erna Solberg said the murders were “a brutal and senseless attack that we condemn”.

Morocco’s general prosecutor said on Wednesday that a suspect arrested in main tourist hub Marrakech was a member of a militant group, but did not name the organisation.

The Danish intelligence service said in a statement Islamic State could be responsible.

Morten Bøås at the Norwegian Department of Foreign Affairs said the killings were unlikely to be the work of more established terrorist groups.

He told aftenposten.no that he thought the group of men may have been inspired by ISIS or radicalised through the web.

“The video and preliminary investigation according to the Moroccan authorities indicate that the killings may be related to the terrorist organisation Islamic State.”

It’s thought that the suspects may have stalked the pair before attacking them while they slept on Monday.

CCTV reportedly shows them approaching the campsite where they pitched a camp 600 yards from the women.

Morocco’s public TV channel 2M said on its website that investigations showed that the slaying of the two tourists was related to local militants.

The country is generally considered safe for tourists but has battled for years with Islamic extremism for years, and thousands of Moroccans joined the Islamic State group.

Maren’s mum told Norwegian broadcaster NRK that her daughter was “warm and engaged”.

She said: “Her first priority was safety. The girls had taken all the precautionary measures before embarking on this trip.”

Both were students of “outdoor activities and cultural guidance” at the University of Southeastern Norway and attended a campus in Boe, west of Oslo.

On its home page the university confirmed the women had been on a “month-long, private holiday in Morocco”.

- with Agencies

andrew.koubaridis@news.com.au