The imam accused of master-minding the Barcelona terrorist attacks should have been deported at the end of his prison sentence for drug smuggling, but had the ruling overturned by arguing it would breach his human rights, it has emerged.
Islamic preacher Abdelbaki Es Satty was told he must comply with an expulsion order when he left jail in April 2014, according to the Spanish daily, 'El Mundo'.
But the 42-year-old Moroccan won an appeal against the decision after arguing his case in front of a judge.
The preacher followed up his court win by seeking asylum through lawyers in an application filed on November 29, 2014, according to 'El Mundo'.
The decision meant that he was able to move freely among the 26 EU countries that form part of the Schengen area.
Es Satty was jailed for four years in 2010 for smuggling hashish between Morocco and Spain, and while in prison became close to one of the ringleaders behind the Madrid bombings.
It is thought he may have been radicalised while in prison, and after leaving prison became an imam at a mosque in the town of Ripoll, from where last week's attacks were planned.
Es Satty, who police confirmed last night had died in an explosion at a bomb factory in the Catalan town of Alcanar, is thought to have brainwashed the terrorists.
Spanish officials have not responded to the claims that Es Satty ought to have been removed from Spain.
Under Spanish immigration laws, foreign-born nationals who receive prison sentences of more than one year often face the threat of expulsion when they leave jail.
The court that took the decision on Es Satty is said to be based in the eastern Spanish city of Castellon, where he served his sentence.
Meanwhile, an alleged member of an Islamist cell suspected of carrying out last week's deadly Barcelona van attack told a Spanish court yesterday that the group had been planning a much bigger strike using explosives, a judicial source said.
The testimony, to a closed hearing at Spain's High Court, came from Mohamed Houli Chemlal, one of four detained suspects brought to Madrid to testify for the first time in court about the plot.
Two of the suspects told the court that Es Satty was the instigator, the source said, adding that the public prosecutor had asked the judge to send all four to jail while investigations continued.
'El Mundo' said Chemlal told the court that the group planned to attack architect Antoni Gaudi's landmark Sagrada Familia church and other Barcelona monuments, but this could not be immediately confirmed.
Chemlal was arrested after being hurt in the blast at a house in Alcanar, southwest of Barcelona, a day before Thursday's van attack on the crowded Las Ramblas boulevard in Barcelona, which left a trail of 13 dead and 120 injured people from 34 countries.
The 21-year-old arrived at court wearing hospital-issue pyjamas, with a bandaged hand and cuts to his face and bare ankles.
Police found 120 butane gas canisters and traces of a home-made explosive in the rubble of the house at Alcanar, where they say two of the plotters were killed.
They believe that the accidental explosion led the group to abandon plans for a bomb attack and to stage a vehicle assault instead.
Yesterday's court hearing was the first in a long legal process, and it could be months or even years before the case is brought to a full trial.
The four are the only alleged members of the group still alive after the driver of the van that ploughed through the crowd in Barcelona, 22-year-old Younes Abouyaaqoub, was shot and killed by police on Monday.
In little more than a year, Islamist militants have used vehicles as weapons to kill nearly 130 people in France, Germany, Britain, Sweden and now Spain.
Isil claimed responsibility for the latest attack and a separate deadly assault, hours later, in the coastal resort of Cambrils, south of Barcelona.
In Cambrils, a car rammed passers-by and its occupants got out and tried to stab people. The five assailants, who were wearing what turned out to be fake explosive belts, were shot dead by police, while a Spanish woman died in the attack.
Most of the 12 suspects lived in the town of Ripoll, set in forested hills beneath the Pyrenees north of Barcelona, and most were young men of Moroccan descent.
An extremist cell was preparing bombs for an imam who planned to blow himself up at a Barcelona monument, a key suspect in the attacks that killed 15 people in north-eastern Spain told a judge, according to a judicial official.
War On Terror
Four men accused of being members of an Islamist cell behind a van attack that killed 13 people in Barcelona last week appeared in court on Tuesday, a day after the alleged driver was shot dead by police.