— Before he boarded a Paris
-bound train last week, armed with an assault rifle and intent, the authorities say, on carrying out a blood bath, Ayoub El Khazzani had spent the final chapter of his troubled time in Spain in this gritty port city, living in a run-down apartment block with his parents within walking distance of the local mosque.
The mosque, Taqwa, was under police surveillance from the first day work started on turning what had been an auto repair shop into a place of worship, Nordi Mohamed Ahmed, vice president of the association that runs the mosque, acknowledged in an interview.
But while the authorities point to the mosque as a crucial part of Mr. Khazzani’s transformation from onetime petty hashish dealer to someone suspected of being a radical, Mr. Mohamed Ahmed said the preaching here was not to blame.
“Women are also allowed to pray here,” he said, “which certainly wouldn’t happen if this was a radical place.”
Still, Mr. Khazzani’s association with the mosque, where his father helped with the refurbishment and remains the caretaker, and where his brother once served as treasurer, was apparently enough to persuade the Spanish authorities to place him under surveillance, too.
His arrest after he was overpowered by passengers, including two vacationing American service members and their friend, has put further — and for those here, unwelcome — scrutiny on the mosque. It has also underscored the Spanish authorities’ intensive surveillance of a quickly multiplying number of potential threats, as in a growing number of other European Union countries, while exposing gaps in the intelligence sharing among them.
The Spanish intelligence services informed their French counterparts that Mr. Khazzani, 25, who held a Spanish residency card but a Moroccan passport, was a potential threat in February 2014, as he was leaving Algeciras for France
. It did little, though, to stall his plan to carry out what President François Hollande of France said would have been “a massacre.”
Before then, Mr. Khazzani had lived with his parents, who had emigrated from Tétouan, Morocco
, joining them first in Madrid
in 2007 and then here, in one of the poorest neighborhoods of an industrial city. In Madrid, he was arrested on suspicion of dealing hashish around Lavapiés, a migrant district, and was detained twice in 2009.
“He had some problems with the police for carrying hash, but that’s not doing something very bad — a lot of people smoke,” Mr. Khazzani’s father, Mohamed, who still resides here and makes a living collecting and selling recyclable materials, said in an interview.
Mr. Khazzani’s last drug-related arrest took place in Ceuta, a Spanish enclave in North Africa
, in September 2012. A photograph released of him then shows Mr. Khazzani with a beard, rather than being cleanshaven as in a police mug shot from his arrests in Madrid.
If his journey from criminalization to suspected radicalization sounds familiar in Europe
, it is, and has by now been followed by any number of terrorism suspects, including attackers in Paris and Copenhagen
Antonio Sanz, the national government’s delegate in the southern region of Andalusia, said on Monday that Mr. Khazzani could be a case of the “merger between radicalism and drugs trafficking.”
Even if Mr. Khazzani played no official role in the Taqwa mosque, he is remembered by friends here not only as devout, but also determined to stay clear of the hashish trafficking network around Algeciras, a city of about 117,000 residents that is the main transit port between Spain and Morocco.
“He was respectful, never looking for trouble and really wasn’t one of the guys hanging out on the streets,” said Javier Sánchez, 23, who lives two floors above the Khazzani family and regularly played soccer with Mr. Khazzani.
Mr. Khazzani’s apparent effort to straighten out his path, however, led to his increasing association with the Taqwa mosque, which François Molins, the chief Paris prosecutor, described at a news conference Tuesday as one “known for its radical preaching.”
It was also one clearly on the radar of Spain’s intelligence services. Since March 2004, when Madrid’s Atocha station was the target of train bombings linked to Al Qaeda that killed almost 200 people, the authorities here have been extra vigilant.
Since then, the Spanish police have carried out about 130 raids, detaining some 575 people linked to Islamic extremism. A few raids have been coordinated with the Moroccan police, the latest one on Tuesday in which 14 people were arrested, accused of recruiting fighters for the Islamic State.
Even so, Spain’s effort to monitor potential threats among the country’s Muslim population of about 1.8 million — 4 percent of the total population — is seemingly more manageable than that of some other European countries.
While acknowledging the risk of another terrorist attack, Jorge Fernández Díáz, Spain’s interior minister, told a conference last month that “Spain is more and better prepared than ever.”
The minister estimated that 118 people had left Spain to fight alongside jihadist groups in Syria; 15 of them have since returned to Spain, “the majority of whom are already in prison,” he said. By comparison, France has grappled with an exodus of about 1,700 fighters.
But the persistent marginalization of Muslim populations like the one here in Algeciras continues to raise concern.
Mr. Khazzani had found some part-time work, including in a Moroccan teahouse, but never a steady job — like almost every person interviewed around his former neighborhood, El Saladillo. The unemployment rate in Algeciras runs at 40 percent.
When the Spanish intelligence services alerted France about Mr. Khazzani’s movements, he was leaving Spain for France after landing a work contract, alongside a handful of other job-seeking Moroccans living in Algeciras, from the French subsidiary of a telecommunications company, Lycamobile.
The contract, which required him to hand out pamphlets to potential customers on the outskirts of Paris, was an opportunity to make a fresh start after an untethered and jobless youth, according to his father and other residents of El Saladillo.
“He went away to France thinking that he had found a very good job, but instead they kicked him out and left him with nothing and no money,” Mr. Khazzani’s father said. “I don’t know what then went wrong.”
Alain Jochimek, the French director of Lycamobile, told France Info radio that the company did not renew Mr. Khazzani’s short-term contract because he did not have working papers to remain in France.
Ignacio Álvarez-Ossorio, a professor of Arab studies at the University of Alicante, said Mr. Khazzani appeared to “fit the profile” of Islamic radicalism in Spain, which has been limited to people economically marginalized and “with a lot less education” than some of the Islamic fighters raised in France or Britain
While Spain’s antiterrorism track record is strong, he added, “you can’t expect proper integration when unemployment levels are so high.”
Still, since Mr. Khazzani’s arrest, the mayor of Algeciras and other officials here have played down the link between joblessness and the rise of fundamentalism in the city, where Taqwa is one of six mosques.
Mr. Sanz, the government official, said that Algeciras, far from being a hub of radicalism, should be praised as “an extraordinary example of the integration of cultures.”
Kamal Cheddad, the president of the Muslim community of southern Algeciras, said he did not know Taqwa’s leaders well, or how the mosque operated, despite its proximity to his own mosque, Omar Ibnu Ljattab.
“I guess some people opened this mosque because they couldn’t do what they wanted in the existing ones,” Mr. Cheddad said of Taqwa. “They opened without asking any permission.”
On Tuesday, a dozen men showed up for evening prayers at Taqwa. Mohamed Ali Mustafa Amar, another member of the mosque’s association, explained that as many as 100 people usually attended Friday prayers, but that some worshipers were now staying away because of the unwanted attention caused by their former member.
“These are humble people who come to pray to God and certainly not to think about terrorism,” he said. “It’s absurd to look for anything radical here.”
Mr. Mohamed Ahmed, the vice president of the Taqwa mosque association, acknowledged that the mosque had undergone a management change in 2013 “to make it more transparent and liberal.” But he rejected the idea that it ever spread extremism.
Rather than radicalism, he argued, “the problem is that there isn’t unity in the Muslim community” of Algeciras. Asked about Mr. Khazzani, he said that “he wasn’t here long enough to claim you really know a person.”
And he added: “Nobody should judge the radicalism of a man by his beard.”