Morocco's counterterrorism chief said Monday that five more people have been arrested in connection with the horrific ISIS-inspired murders of two Scandinavian hikers in the High Atlas mountains, including the so-called "emir" who masterminded the killings.

Abdelhak Khiam, the head of the country's central office for judicial investigation, identified the alleged ringleader to Agence France-Presse as Abdessamad Ejjoud, a 25-year-old street vendor who lived on the outskirts of Marrakech. Khiam said Ejjoud had "formed a kind of cell that discussed how to carry out a terrorist act inside the kingdom ... targeting the security services or foreign tourists."

A total of 18 people have been arrested in the murders of 28-year-old Norwegian Maren Ueland and 24-year-old Dane Louisa Vesterager Jespersen, whose bodies were found Dec. 17. Khaim said three of those arrested had terror-related criminal records.

CLICK HERE TO GET THE FOX NEWS APP

Ejjoud was believed to have carried out the murders along with 33-year-old Abderrahim Khayali, 27-year-old Younes Ouaziyad and 33-year-old Rachid Afatti. Investigators have said the four men shot a video the week before the murders in which they pledged allegiance to ISIS leader Abu Bakr al-Baghdadi. However, Khiam told AFP the four had not had contact with ISIS leaders "in conflict zones, whether in Syria, Iraq or Libya."

Nine of the 18 men were arrested on Friday. Officials said they were heading to the area where the women were beheaded with the intent to commit a crime. According to Boubker Sabik, a spokesman for the Moroccan security and domestic intelligence services, investigators found electronic devices, knives, bomb-making materials and unauthorized rifles.

The killings have shocked Morocco, which has seen relatively few acts of terror compared to its North African and Middle Eastern neighbors. On Saturday, hundreds of people took part in a candlelit vigil outside the Norwegian and Danish embassies in the capital, Rabat. Some carried flowers, while others held banners that said "Sorry."

"Words cannot describe this barbaric crime," said Khalil Bensalmi, in his fifties, who came to the vigil with his two daughters. "This doesn't at all represent Moroccan society or its pacifist culture."

Ratiba Naji, a housewife, tried to hold back her emotions as she said, "It's horrendous. These girls deserve life. Their parents must be devastated. I am sorry."

ARRESTS IN MOROCCO BACKPACKER BEHEADINGS FOILED 'TERRORIST PLOT,' INVESTIGATORS REVEAL

The killings marked the first terrorist attack to hit Morocco since 2011, when a suicide bomber detonated in Marrakech and killed 16 people.

More than 1,000 Moroccans have joined ISIS in recent years, and Moroccan authorities arrested 20 cells with terrorist affiliations between 2017 and 2018.

The Associated Press contributed to this report.