Morocco busts 'IS cell' ahead of UN climate summit
Five suspects were arrested on Friday in the northern city of Tetouan as part of a wide-ranging anti-IS operation.
According to the statement, the cell had been planning to carry out terrorist attacks aimed at "destabilising the country".
The would-be militants were in the process of preparing a military training camp in a forest, said the ministry, and were planning to join IS camps in Syria, Iraq or Libya with the intention of waging "jihad" in Morocco.
The arrests come just three days before a UN climate summit in Marrakech, in which diplomats and world leaders will hold talks on last year's Paris Agreement to combat global warming.
Morocco has been on guard against deadly attacks like those claimed by IS in Tunisia last year that killed 59 foreign tourists.
Its recent successes in foiling terror plots have been put down to a newly-formed Central Bureau of Judicial Investigations, dubbed "Morocco's FBI".
Last month, Moroccan police arrested a group of ten women militants who were allegedly planning suicide bombings across the country.