The Moroccan authorities said on Thursday that they raided an Islamic State (IS) affiliate cell in the central city of Berkane.
The interior ministry said in a statement that the seven-member terrorist cell had pledged allegiance to a so-called Caliph at the radical group.
"Investigations revealed that the cell members were planning to carry out dangerous terrorist operations in Morocco, including kidnapping and killing people who did not share their ideas, as well as tourists going to the eastern region's sea resorts," the ministry added.
To reach their aims, the ministry said the cell members underwent intensive paramilitary training in a mountainous region near Berkan in an attempt to attack security agents, and rob them of their weapons.
The raid is one of the latest on radical groups that were dismantled by Morocco in the last weeks.
Moroccan authorities announced last week that they arrested nine alleged IS recruiters operating in several cities in the North African kingdom.