A suspected member of the terror cell that unleashed carnage in Spain last week admitted to a judge on Tuesday that the jihadists had planned to hit monuments in an even bigger attack.
Mohamed Houli Chemlal, 21, said he knew of the plans two months ago, as he, and three other suspects, appeared in court for the first time since twin attacks killed 15 people and wounded more than 100.
The four are the only surviving suspects from what was believed to be a 12-man terror cell that rammed a van into pedestrians on a tourist-packed boulevard in Barcelona on Thursday. Hours later, members of the group committed a similar attack in Cambrils further south.
After a full day hearing before the judge, Chemlal and another suspect, Driss Oukabir, 27, were remanded in custody and charged with terror related offences.
But the third man who owns the car used in the Cambrils attack, Mohamed Aallaa, was granted conditional release, with the judge saying evidence against him was weak.
The judge gave himself three more days to decide if the fourth suspect, Salh El Karib -- who manages a store that allows people to make calls abroad -- should be remanded or released from custody.
Chemlal, a Spaniard, told the judge the cell was planning "an attack on an even greater scale, targeting monuments" using bombs, a judicial source told AFP.
He had known of the plans for an attack "at least two months ago", he added.
Chemlal, dressed in hospital pyjamas and with his right hand bandaged, was brought in after a doctor said he was fit for interrogation, a court spokesman told AFP.
He was injured in an accidental explosion at the group's makeshift bomb factory on Wednesday evening. One of those killed in the blast was an imam, Abdelbaki Es Satty, who is thought to have radicalised him and other young suspects.
Chemlal only survived because he was out on the porch when the blast occurred.
He told the judge the imam had wanted to blow himself up. The judicial source said that among the four suspects, "two blamed the imam for the plot while another two denied knowing him".
Earlier, police had revealed that the suspected jihadists had been preparing bombs for "one or more attacks in Barcelona".
Details on their plans were outlined in the 14-page ruling issued following Tuesday's preliminary hearing.
Police clearing the rubble in Alcanar found "a large quantity of butane gas canisters, acetone, oxygenated water, bicarbonate, a large quantity of nails ... and detonators to spark the explosion," said the court papers.
These are among key ingredients of TATP -- the explosive of choice of the Islamic State group, which has claimed the attacks.
In the rubble, police also found a sheet of paper slipped into a green-coloured book, which said: "A brief letter from the soldiers of the Islamic State on the territory of Al Andalous to the crusaders, the sinners, the unjust and the corrupters".
Al Andalous is the name of the territories governed until 1492 by Muslims better known as Moors.
But the accidental explosion in their bomb factory -- a house in Alcanar, south of Barcelona -- forced the suspects to alter their plans.
After losing their bombs and two of their members in the blast in Alcanar, the jihadists decided a day after to rent a van.
But they once again suffered a false start as its driver was involved in an accident, not far from Cambrils.
A second van rented by Driss Oukabir was used two hours later in the Barcelona rampage.
In court on Tuesday, Oukabir admitted renting the van but said he did so for moving purposes.
Aallaa, freed conditionally and the owner of the Audi used in Cambrils, said it was registered under his name for insurance reasons but that his brother Said, 19, used it.
The court hearing came five days after the twin vehicle assaults.
Spanish police on Monday shot dead Younes Abouyaaqoub, the suspected Barcelona van driver, the last fugitive member of the cell.
While Catalan police say the cell has been dismantled, investigators are trying to determine if it had support from other individuals.
Questions are also arising about the group's possible international connections.
In Belgium, the mayor of the Vilvorde region told AFP that Satty spent time in the Brussels suburb of Machelen -- next to the city's airport -- between January and March 2016.
And in France, Interior Minister Gerard Collomb told BFMTV that the Audi used to kill people in Cambrils had been detected by speed cameras in the Paris region while making "a very rapid return trip" days before the Spanish attacks.
At least one of the suspects also spent a night in Zurich in December, according to Swiss police.