RABAT/MADRID - Moroccan and Spanish authorities have broken up a jihadist cell linked to the Islamic State group in the south of Morocco and arrested its three members in a joint operation, security services said Wednesday.

One of the "extremist elements" was arrested by special forces from Morocco's DGST domestic intelligence agency in the rural southern region of Chtouka Ait Baha, the country's Central Bureau of Judicial Investigation (BCIJ) said in a statement.

Two other members of the cell were arrested by Spanish authorities in Almeria, in the European country's southeast, said the BCIJ, which oversees counter-terrorism operations.

A police source in Spain confirmed the Moroccan statement to AFP but did not give further details.

The BCIJ said the suspects had pledged allegiance to IS and were promoting "extremist ideas for recruitment purposes".

The suspects had been hoping to carry out "terrorist operations" elsewhere after they were "unable to reach (IS) strongholds in the Sahel region", it said, referring to a vast area south of the Sahara.

However, they had been in contact with fighters in the Sahel charged with helping new recruits join IS, the BCIJ added.

Morocco has been largely spared jihadist violence in recent years, but authorities regularly announce arrests of suspected IS affiliates.

Since 2002, the North African kingdom has broken up more than 2,000 "terrorist cells" and detained some 3,500 suspected jihadists, according to BCIJ figures.