Moroccan authorities have arrested two women in connection with a recently dismantled militant cell planning attacks in the country.

The Interior Ministry announcement carried by the state news agency said the women were arrested in the port city of Tangiers and they had previously spent time in Al-Qaida training camps in Afghanistan and Pakistan.

The statement added that further research into the cell, whose dismantling was announced Tuesday, revealed that it had pledged allegiance to the Islamic State and had planned to announce itself as that group's affiliate in Morocco.

The cell's plan was to bring in fighters that had trained with the Islamic State as well as weapons and establish a brigade in the south of the country to carry out attacks on various targets, the ministry said.