Spanish police have arrested eight suspected Islamist militants. Authorities say they were planning to carry out a terrorist attack in the center of the capital.

The Interior Ministry says four of the detainees are from Algeria, one is from Morocco, and another is from the Spanish enclave of Ceuta, across the strait of Gibraltar.

A ministry statement says the suspects belonged to a terrorist cell and were in touch with individuals in the United States, Europe, and Australia.

Interior Minister Jose Antonio Alonso says the suspects were preparing to bomb the headquarters of the Superior Court in Madrid.

Mr. Alonso says, although the suspects were not found to have explosives, documents seized in the operation made their plans clear. These included acquiring explosives to carry out terrorist attacks.

Authorities carried out raids in Malaga, Almeria, Gandia, Pamplona and Madrid. They seized letters, bank records, laptops with digital documents, and a manual on how to carry out a suicide attack.

Authorities say all the suspects had criminal records, and were recruiting members among Muslims in prisons. More arrests are expected.

The arrests were made as part of an investigation that Superior Court Judge Baltasar Garzon has been carrying out for several months into networks of Islamic extremists in Spain. Since September 2003, Mr. Garzon has indicted 41 people on terrorism charges.

Another judge at the Superior Court is investigating the Madrid train bombings that killed 191 people on March 11.

Authorities have not established whether there is a link between the suspects arrested this week and the March attack.