Dris Oukabir, Mohamed Houli Chemlal, Salah El Karib and Mohamed Aallaa. CARLOS ROSILLO Y SANTI BURGOS

The terrorist cell responsible for the attacks last week in Barcelona and Cambrils, which killed 15 people and injured over 100 others, planned to carry out a much larger attack.

The cell, based in the small Catalan town of Ripoll, and headed by the imam Abdelbaki Es Satty, had spent at least six months planning a large attack involving explosives in the southern Catalan town of Alcanar.

One suspect told the High Court the cell was planning to carry out an attack using bombs on “monuments” in the Catalan captial

However, that plan was thwarted when there was an explosion at the property late on August 16, the day before the Barcelona attack. Es Satty died in that explosion.

“The explosion [at the house in Alcanar] that ruined the terrorists' initial plan led to the following events: that is, the renting of the vans, the running over of multiple people in La Rambla in Barcelona, and the attack with bladed weapons in Cambrils,” stated Spanish High Court judge Fernando Andreu in a 14-page writ.

“[The evidence] makes it clear that explosive devices were being built there [in Alcanar] with the aim of carrying out a large-scale terrorist action,” explained the judge in his writ.

The document also provided details of a second base of operations for the cell apart from that in Alcanar: a farmhouse in Riudecanyes, in Catalonia’s Tarragona province. In the remains of a bonfire at that property, police found the driving license of Mohamed Hichamy, killed in Cambrils, and the passport of Younes Abouyaaqoub, the man thought to have driven the van in the La Rambla attack, who was killed by police on Monday.

Police found the passport of the man suspected of driving the van in the Barcelona attack in the remains of a bonfire

A search of that property also turned up receipts for the purchase of at least 500 liters of the explosive acetone peroxide (TATP), regularly used by the so-called Islamic State (ISIS) in its attacks, “such as those in Paris and Brussels,” according to Andreu.

In addition, officers found several airline tickets to Brussels in the name of the imam Abdelbaki Es Satty.

Andreu’s writ also revealed that members of the terrorist cell purchased four knives and an ax at 9.26pm on August 17, just hours after the Barcelona attack. They planned to use those weapons in the second attack in Cambrils.

Hearing on Tuesday

In a hearing on Tuesday at the Spanish High Court in Madrid, Andreu questioned four suspects linked to investigations into the Catalonia attacks.

The first to appear before the judge was 21-year-old Mohamed Houli Chemlal, injured in the explosion in Alcanar. Appearing in hospital pajamas, he told the court the imam had headed up the cell and that the group planned to carry out attacks against “monuments” in the Catalan capital. Sources said no specific objectives were mentioned.

Driss Oukabir then testified, also confirming the imam had headed the cell.

Oukabir, 28, was arrested after it emerged that his name had been listed as the person who rented the van used in the Barcelona attack. He initially claimed that his brother Moussa, killed in the Cambrils attack, had stolen his documents to rent the vehicle. However, in court, Oukabir said he himself had rented the van at the request of Es Satty. Oukabir said he believed it would be used for removals for three members of the terror cell.

At least 500 liters of the explosive acetone peroxide (TATP) were found at a second base of operations of the cell

Third to testify was Mohamed Aalla, 27, the owner of the Audi A3 driven by the terrorists in Cambrils. He said the car was in his name for “insurance purposes” and told the court the car was usually used by one of his two brothers, also involved in the terror attacks. One of those brothers was killed by police in the Cambrils attack and the other is currently missing although evidence suggests he was also killed in the explosion in the house in Alcanar.

The last suspect to testify was Salah El Karib, 34, who says he acted as a middleman in the sale of air tickets to Oukabir and the imam of Ripoll in order to earn a commission.

Houli and Oukabir, were subsequently remanded in custody without bail because there were “clear indications” they had been involved in the attacks. Oukabir is suspected of belonging to a terrorist organization, homicide and assault. Houli is suspected of the same crimes and of storing explosives and of causing damage by the use of explosives.

Meanwhile, Mohamed Aalla, 27 has been released with Andreu saying the evidence suggesting he was a member of the cell was not “sufficiently solid.” He has been stripped off his passport and will have to report before a judge every week.

Salah El Karib will remain in detention for a further 72 hours pending further investigations.