Morocco on Wednesday announced the arrests of 52 suspects planning to set up a branch of the Islamic State militant group and carry out attacks in the North African country.
The suspects have been detained and will go on trial once an investigation has been completed, the interior ministry said.
"The arrested individuals planned to set up a vilayet (province) in Morocco affiliated to Daesh," it said, using an Arabic acronym for the IS group.
It said the arrests had foiled "terrorist plots at a very advanced stage of preparation on prisons, security establishments, festivals and leisure centres in several cities of Morocco, apart from assassinations of security officials, soldiers and tourists".
The suspects had been using social media to drum up propaganda for the IS group and to enroll young recruits to join up and travel to conflict zones, the ministry said.
It said raids on homes had unearthed documents on the fabrication and use of explosives and firearms, as well as books inciting suicide attacks.
Rabat says 159 "terrorist cells" have been busted since 2002, including 38 over the past three years with ties to militants in Iraq and Syria.
A study by the US-based Soufan Group said last December that at least 1,200 Moroccans had travelled to fight alongside IS in Iraq and Syria in the previous 18 months.