Spanish police say they have arrested two men and a woman in northeastern Catalonia on suspicion of being involved in a network that recruited militants for the Islamic State group.

The men, aged 32 and 42, are both from Tangiers in Morocco and shared the same Barcelona address. Investigators say they used the internet and social networks to disseminate "extremist ideology" aimed at attracting followers to send to conflict areas in the Middle East and Afghanistan.

A statement said police also arrested a 24-year-old Spanish woman in the northeastern city of Granollers Saturday.

It said the woman had been radicalized and now shared the same ideology as the extremists and was preparing to travel to Afghanistan.