Four men suspected of killing two backpackers in Morocco acted alone, despite pledging themselves to ISIS, an official said today.

Louisa Vesterager Jespersen, 24, from Denmark, and Maren Ueland, 28, from Norway were found dead early on Monday near the village of Imlil on a route to Toubkal, North Africa's highest peak and a popular hiking and trekking destination.

Boubker Sabik, spokesman for the Moroccan security and domestic intelligence services, also said the arrest of nine more people in the case had foiled a terror plot.

Sabik said on the state 2M TV channel that the four suspects, aged between 25 and 33 years, had headed to the Imlil area intent on committing a crime but without selecting their target in advance.

They had pledged allegiance to Islamic State in a video made on the Friday before the bodies were found, but without agreeing this in advance with any foreign entity.

Read More

However, he dismissed reports that one was a returning foreign fighter from the Middle East. All four, who originated from the outskirts of Marrakech, had only informal jobs and had a low level of education, he added.

Referring to the nine other suspects detained on Friday in various Moroccan cities, he said their arrests "spared Morocco a terrorist plot".

Electronic devices, an unauthorised hunting rifles, knives and materials that could be used for bomb-making were found in the course of those raids.

Sabik gave no details of this suspected plot but said Morocco is stepping up efforts to counter security threats posed by the return of Islamic State fighters from Syria and Iraq.

Ouziad Younes, one of the three suspects in the grisly murder of two Scandinavian hikers (Image: AFP/Getty Images)

Rachid Afatti is also a suspect (Image: AFP/Getty Images)

Read More

So far 242 out of 1,669 Moroccans who joined the militant group had been arrested, he said. Some fighters were using false passports and trying to hide among refugees heading for Europe as the jihadists suffer setbacks in the Middle East.

Authorities were still trying to authenticate a video that has been shared on social media purporting to show the beheading of one of the victims.

"The video has no background and the clothes of the victim are not identical to those in reality," he said.

Ejjoud Abdessamad is being held in police custody (Image: AFP/Getty Images)

Compared with other countries in North Africa, Morocco has been largely insulated from militant attacks.

The most recent took place in April 2011, when 17 people were killed in the bombing of a restaurant in Marrakech.