RABAT, Morocco -- With hundreds of Moroccans heading to Syria and Iraq to fight with extremists groups, Morocco has presented a new law criminalizing training with extremists or attempting to reach their camps.

The new law, which will go before parliament in October, comes as Morocco is expressing increasing concern about the number of its citizens fighting with groups like the Islamic State, which controls large swaths of Syria and Iraq.

Those convicted of seeking out training camps will face five to 15 years in prison and fines of between $5,800 and $58,000, according to the draft law, which was announced by the government late Thursday.

After Tunisians, Moroccans are the largest group from North Africa joining the Islamic State militants in Syria and Iraq, with at least 1,200 fighting there.

Morocco has already announced the dismantling in the past year of dozens of recruitment networks aimed at sending Moroccans abroad to fight.

Many of these networks have been centred in the mountainous northern city of Fez and have links to the Spanish enclaves on Morocco's Mediterranean coast.

On July 16, the government announced a heightened state of alert over fears of a terrorist attack, especially from Moroccans fighting abroad, and since then anti-aircraft missile batteries have been seen around the airports of Casablanca, Tangiers, Marrakech and key refineries and power plants.

The new law will allow the government to charge Moroccans engaged in terrorist activity abroad as well as those doing it inside the country.