Spain said it arrested two suspected militants in its North African enclave of Ceuta early on Tuesday, both accused of being part of an Islamist cell planning an attack in the country.
The interior ministry said the arrests were part of a wider security operation that has seen more than 20 arrests since September.
Western nations have become increasingly worried about the risk of youths becoming radicalized by militants in North Africa and the Middle East and returning home to launch attacks.
The two suspects in Ceuta, on the Moroccan coast, were arrested under the same police operation that detained four people in January on suspicion of using social media to recruit people to militant groups like Islamic State, the ministry said.
A Moroccan woman who is a Spanish resident was arrested on Sunday on suspicion of attempting to join Islamic State fighters in Syria.