MADRID — The police in Spain’s North African enclave of Ceuta arrested four men on Saturday suspected of belonging to a militant Islamist network that may have been planning an attack in Spain, the Interior Ministry said.

Spain has stepped up security as well as efforts to prevent the radicalization of young Muslim citizens after attacks in Paris this month in which Islamist gunmen killed 17 people.

Confirming the arrests, the Interior minister, Jorge Fernández Díaz, said, “They are two pairs of brothers, highly radicalized and highly trained.”

Mr. Díaz said there were “many parallels” with the two brothers who attacked the Paris office of the satirical weekly Charlie Hebdo this month. He did not elaborate.