MADRID -- In the weeks after the Sept. 11, 2001, attacks in the United States, Spanish authorities briefly detained Jamal Zougam, a key suspect arrested in the Madrid train bombings, after electronic surveillance revealed his contacts with known Al Qaeda operatives, a Spanish counterterrorism official confirmed yesterday.
The Moroccan-born suspect was rounded up in the fall of 2001 in a "sweep" of suspects whom authorities knew from wiretaps, surveillance, and interrogations to be in contact with Al Qaeda operatives, said the official, speaking to the Globe on condition of anonymity.
Zougam was arrested while eating at a Moroccan restaurant, and his apartment was searched. He was released days later when Judge Baltasar Garzon, an investigative magistrate at the helm of Spain's counterterrorism effort, was unable to establish a case against him.
Spanish police said yesterday at least six suspects in Thursday's train bombing remain at large, all of them believed to be Moroccans. The investigation is increasingly focused on a web of contacts that lead to the Al Qaeda terrorism network inspired by Osama bin Laden, who has called for an international jihad, or holy war, against the West.
While investigators continued to scour for clues, the death toll climbed. A 45-year-old woman died of her injuries, bringing the number of total dead to 201. Of the more than 1,500 wounded, eight remained in critical condition.
The Spanish official who spoke about Zougam's previous brush with police said the intelligence failure surrounding the attack -- in which a series of 10 bombs tore through four trains on a rush-hour commuter line -- was "extremely worrying."
But Spanish authorities hastened to explain the elusive nature of investigating a shadowy Islamic militant underground intent on carrying out terrorism.
And they pointed out that Spanish investigators -- especially Garzon -- are widely credited by terrorism specialists for an aggressive prosecution and dogged investigation of Islamic militant cells.
"This country has been one of the most effective in the world at aborting terrorist activity. We can stop someone like Zougam, we can ask him questions, we can trail him, but we are still a democracy, and no democracy can aspire to defend itself with 100 percent full-proof security," said a terrorism analyst for the Spanish government.
Cardinal Antonio Rouco Varela led a Mass in Madrid's Roman Catholic cathedral last night in honor of the victims.
"The tragic attacks of March 11 have sunk us all into deep pain," intoned Varela, a large, black ribbon hanging above the altar. "To kill your own kind, to kill a brother, is to attack God himself."
Police in San Sebastian, a Basque city, said they detained an Algerian who allegedly spoke of a terrorist attack in Madrid two months before it happened.
Ali Amrous was picked up Monday for questioning by authorities. He was previously arrested in January after a neighborhood disturbance, during which he allegedly told police, "We will fill Madrid with the dead."
But for now, the investigators are focusing largely on Zougam as a chief participant in last week's attack.
Abdelhadi Joudi, 40, a construction worker, knew Zougam for the last five years. When they first met, Joudi said, Zougam had a thick beard and short-cropped hair and wore an Islamic prayer cap, the traditional look of an Islamic militant. He prayed every day at a nearby mosque.
Then after his release from detention in 2001, he shaved his beard and began to grow his hair long, Joudi said.
"I'm convinced the only thing he did is sell fake phone cards. Everybody knows he liberated phones, and they made a lot of money doing that," said Joudi, referring to the illegal manipulation of mobile phones that is a big business in the immigrant underworld of a Madrid neighborhood known as Lavapies, where Zougam and his half-brother owned a mobile-phone shop.
Zougam has been identified by Garzon as a follower of Imad Yarkas, known as Abu Dahda, the alleged leader of Spain's Al Qaeda cell who is now in jail on suspicion he helped plan the Sept. 11, 2001, attacks.
The daily newspaper El Pais reported yesterday that police believe they have identified five other Moroccans who directly participated in last week's attacks who are at large.
Two people who were traveling on one of the targeted trains told El Pais that Zougam was aboard just before the bombs began exploding.
Spanish police have also arrested two more Moroccans and two Indians, but their possible role in the attacks has not been specified.
A suspected link between the Madrid bombings and suicide bomb attacks last year in Casablanca, Morocco, grew stronger yesterday. A French newspaper and the Associated Press reported that a French private investigator, Jean-Charles Brisard, described a phone tap in which Zougam said he had met with Mohamed Fizazi, the spiritual leader of Salafia Jihadia, a clandestine Moroccan extremist group.