The Moroccan man who allegedly instigated the attacks in and around Barcelona last week escaped expulsion from Spain in 2015 after serving a sentence for drug trafficking, local media report. The imam posed “no real threat,” the judge ruled back then.

Albdelbaki Es Satty, one of the deceased members of the Islamist cell which is said to have carried out the attacks in Barcelona and Cambrils, was ordered to leave Spain in 2014 at the end of his jail term for drug trafficking, according to El Mundo, which obtained access to judicial documents.

Two members of that cell called Es Satty the key organizer of the plot, as the four surviving suspects gave statements at the high court in Madrid on Tuesday.

Read more

Although Es Satty’s role is yet to be defined, Catalan police chief Joseph Lluis Trapero indicated that investigators are working on a hypothesis that the imam radicalized the group’s members, La voz de Galicia reports. Earlier, however, a police spokesperson said they “can’t compromise evidence or leads, or give unreliable information” concerning Es Satty.

The Moroccan-born preacher was detained in 2010 on charges of committing crimes against public health, and was sentenced to four years and one month behind bars. He served time from 2012 to 2014, El Mundo reports, without detailing why the term was reduced.

According to Spanish media, during his time at the Castellon prison, Es Satty made contact with Rachid Aglif, one of the jihadists behind the Madrid train bombings in 2004.

Shortly after being released from prison, Es Satty was ordered by the local authorities to leave Spain and was banned entry for five years, based on the Aliens Act, which allows the deportation of foreigners charged with willful misconduct and who are serving custodial sentences of more than a year.

Es Satty’s lawyer appealed the decree, however, stating it would infringe the defendant’s international rights. The judge, Pablo de la Rubia, sided with the appeal and ruled that the Moroccan was no danger and showed “efforts of integrating into Spanish society,” despite being charged with a serious offense, El Mundo reports.

READ MORE: Barcelona attack suspect reveals bigger attack with explosives was planned

The Moroccan imam died in an accidental blast in a house in Alcanar, where the cell allegedly tried to manufacture explosives a day before the attacks.

In 2016, the Belgian authorities requested information from the Spanish security forces on whether Es Satty had links with Islamist terrorism after suspicions emerged during his stay in the Belgian city of Vilvoorde that year, El Pais reports, citing the city’s mayor, Hans Bonte.

Read more

The head of Vilvoorde’s mosque voiced his concerns after Es Satty “turned up unannounced and said he wanted to be an imam because he had no future in Spain,” Bonte says.

According to the official, the Spanish authorities replied that there was no indication of Es Satty being engaged in radical Islam. Both Belgian and Spanish authorities refused to comment to El Pais, only saying that the imam’s background wasn’t suspicious and they don’t normally share sensitive intelligence.

Es Satty is also believed to have traveled to France on several occasions to take “courses” on bomb-making, La Razon reports.

During Tuesday’s hearing in Madrid, one of the suspected assailants, Mohamed Houli Chemlal, admitted the group planned a larger attack with explosives, according to media citing unnamed judicial officials. On Wednesday, police revealed they had found a belt with real explosives at the house in Alcanar, as well as more than 100 butane canisters, 500 liters of acetone and nails, as AP reports.

READ MORE: Terror timeline: How attacks unfolded in Barcelona & Cambrils

On Thursday, a rented van careened through the crowds at Las Ramblas in Barcelona, killing 13 people and injuring more than 100. Another man was stabbed to death, as the alleged driver, Younes Abouyaaqoub, made his escape on foot. Just hours later in Cambrils, five other men drove their car into pedestrians and went on a stabbing spree, leaving one woman dead.

2 suspects in #Spain’s terrorist attacks sent to jail, 1 released on probation https://t.co/ydTOUpt6GRpic.twitter.com/XIq1lN990j — RT (@RT_com) August 22, 2017

It is not the first time a person with a criminal record has escaped deportation, only to appear later as a suspected terrorist having slipped off the radar of law enforcement.

In a similar case, the perpetrator of the Berlin attack last year, Anis Amri, faced deportation from Italy and Germany, but a lack of necessary papers impeded the procedures. With authorities apparently being warned about a possible threat, the Tunisian drove a truck into crowds at a Christmas market, killing 12 people and injuring dozens of others.

Elsewhere, more than 40 convicted terrorists remain in the UK, as they continue to evade deportation to their home countries through the Human Rights Act, according to the Telegraph, citing an unpublished report by the Home Office. Among them is Baghdad Meziane, convicted of funding Al-Qaeda, who remains in Britain due to fears of being tortured in his native Algeria.Safety fears prevented two others from being removed, including Ismail Abdurahman and Siraj Yassin Abdullah Ali, who were convicted of aiding the London bombings in 2005.