Morocco has dismantled a suspected militant cell linked to Islamic State's affiliate in Libya and that some of the nine men arrested were planning attacks in the North African kingdom.
It was the latest in a series of radical Islamist groups Morocco says it has broken up. An interior ministry statement said the cell was operating in the city of Marrakesh, the coastal town of Sidi Bennour and in Smara, which is in the neighbouring territory of Western Sahara.
It said the nine group members were inspired by another militant from Sidi Bennour who was killed in the Libyan capital Tripoli when militants attacked a prison in September 2015 in a attempt to free inmates there.
Morocco's Central Bureau of Judicial Investigation (BCIJ), the judicial part of the Moroccan domestic intelligence service, has actively tracked alleged militants since Islamic State seized large parts of Syria and Iraq in 2014-15.
Hundreds of fighters from Morocco and other Maghreb states like Tunisia and Algeria have joined Islamist militant forces in Syria's civil war. Some are threatening to return and create new jihadist wings in their home countries, security experts say.
Nearby Libya has become a major draw for jihadists from North Africa and sub-Saharan Africa as Islamic State has taken advantage of the security chaos there to build a base, operate training camps and take over the city of Sirte.
The Moroccan government believes 1,500 Moroccan nationals are fighting with militant factions in Syria and Iraq. About 220 have returned home and been jailed, and 286 have been killed in battle.
Morocco, an ally of the West against Islamist militancy, has suffered militant attacks in the past, most recently in 2011 in Marrakesh when an explosion tore through a cafe and killed 15 people, mostly foreigners