An alleged member of an Islamist terror cell that carried out the Barcelona van attack told a Spanish court on Tuesday (local time) that the group had been planning a much bigger attack using explosives, a judicial source said.
The testimony to Spain's High Court came from Mohamed Houli Chemlal, who was arrested after being hurt in a 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 killed 13 people.
The four remaining alleged members of the terror cell arrived in a Madrid court on Tuesday where they will be questioned by a judge after eight other suspects were killed.
Under heavy security, police vans entered the National Court, which deals with terrorism cases, where a judge will decide what - if any - charges to press against them over their suspected involvement in the vehicle attacks that left 15 dead and 120 injured.
Spanish media have named the suspects as Driss Oukabir, Mohammed Aalla, Salh el Karib and Mohamed Houli Chemal.
Three of them were arrested in the northern Catalan town of Ripoll. One was arrested in Alcanar, south of Barcelona, where a house that was accidentally blown apart turned out to be a botched bomb-making workshop.
On Monday, Spanish police shot dead Barcelona terror suspect Younes Abouyaaqoub, in a dramatic end to a massive manhunt for the Moroccan national who was wearing a fake suicide belt and shouting "Allahu Akbar" (God is greatest) when he was killed.
The Moroccan national was the last remaining member of a 12-man cell suspected of plotting last week's deadly vehicle rampages in Barcelona and the seaside resort of Cambrils that were claimed by Islamic State of Iraq and the Levant (Isil) - its first in Spain.
Four men were detained and the rest were killed - either by police or in an explosion believed to have been accidentally detonated by the suspects themselves in their bomb factory in the seaside town of Alcanar.
Among those killed in the explosion was a Moroccan imam at the heart of the cell, Abdelbaki Es Satty, Catalan police chief Josep Lluis Trapero confirmed on Monday.
Village where suspect shot is 'ideal hideout'
Four days after the van rampage on the tourist-packed Las Ramblas boulevard, police on Monday gunned down 22-year-old Abouyaaqoub in the village about 60 kilometres (40 miles) west of Barcelona, after receiving multiple tip-offs.
Arnau Gomez, who lives about a kilometre away from where the suspect was shot, described the village of 300 people as being an ideal hideout as "it is far from everything".
"In the hills there are many homes of seasonal workers, it's easy to hide," he said.
In Abouyaaqoub's hometown of Ripoll, where many of the suspects grew up or lived, Moroccan factory worker Hassan Azzidi said he was "happy and sad all at once" that the suspect had been gunned down.
"This had to end, because we're living as if in a war, but at the same time, someone brainwashed such a young boy," he said.
In total, 15 people died in the attacks, including Pau Perez, a 34-year-old man found stabbed to death in a Ford Focus outside Barcelona on Friday after Abouyaaqoub hijacked his car to make a getaway.
Influence of imam accused of radicalising others
Investigators seeking to unravel the terror cell had homed in on the small border town of Ripoll at the foot of the Pyrenees mountains in northeastern Spain.
Satty, aged in his 40s, came under scrutiny as he is believed to have radicalised youths in Ripoll.
Police said the imam had spent time in prison and had once been in contact with a suspect wanted on terrorism charges, but was never himself charged with terror-related incidents.
In Belgium, the mayor of the Vilvorde region said that Satty had spent time in the Brussels suburb of Machelen - next to the city's airport - between January and March 2016.
In the Moroccan town of M'rirt, relatives of Abouyaaqoub have accused the imam of radicalising the young man as well as his brother Houssein.
"Over the last two years, Younes and Houssein began to radicalise under the influence of this imam," their grandfather said.
How the suspected jihadists had 120 gas canisters
The suspected jihadists had been preparing bombs for "one or more attacks in Barcelona", Trapero said on Sunday, revealing that 120 gas canisters and traces of TATP - a homemade explosive that is an Isil hallmark - had been found at their bomb factory.
The accidental explosion in the house in Alcanar, south of Barcelona, may have forced the suspects to modify their plans.
Instead, they used a vehicle to smash into crowds on Barcelona's Las Ramblas boulevard.
Several hours later, a similar attack in Cambrils left one woman dead. Police shot dead the five attackers there, some of whom were wearing fake explosive belts and carrying knives.
Hundreds of Muslims rallied on Monday at Las Ramblas, holding slogans like "No to terrorism" and "We are Muslims, not terrorists".