Four men accused of belonging to the cell behind the attacks in and around Barcelona are appearing at the high court in Madrid.
They are being questioned by a judge deciding what charges to press over the vehicle attacks that left 15 people dead and more than 100 injured.
Eight other members of the alleged cell are dead – two were killed in an explosion, six were shot by police.
The last suspect was killed in a vineyard west of Barcelona on Monday.
The surviving suspects were moved, under high security, from Barcelona to Madrid for Tuesday’s hearing.
Investigating judge Fernando Andreu was expected to read out the charges against them, likely to span counts of terrorism, murder and possession of arms.
They began giving evidence before the judge during the afternoon.
First to testify was Mohamed Houli Chemlal, who was in an explosion that reduced to rubble a house in Alcanar, south of Barcelona, the night before the Las Ramblas attack in Barcelona.
He was wearing hospital pyjamas for his court appearance as he is still being treated for his injuries.
Two other suspects were killed in the blast, including Abdelbaki Es Satty, the Moroccan imam thought to have been a radicalising influence on the suspects.
Police later found a cache of 120 gas canisters at the scene but the blast is thought to have prompted the attackers to change the nature of the attack.
The other suspects in court are:
- 28-year-old Driss Oukabir: he has already protested his innocence. His passport was found in the van which ran amok in the Las Ramblas boulevard in Barcelona, but he says his brother Moussa – who was killed in the attack in Cambrils – had stolen his documents
- Mohammed Aalla, 27, alleged owner of the Audi car behind the Cambrils attack
- Sahal al-Karib, 34, accused of running an internet cafe in Ripoll used to send money to Morocco.
The judge will decide whether to remand the suspects in custody and deny bail as demanded by the prosecutor.
As well as the two who died in the explosion, five attackers were shot dead by police following the Cambrils attack.
The last man to be caught was Younes Abouyaaqoub, a 22-year-old Moroccan thought to have been the driver of the van that rammed into crowds in Barcelona.
He was shot dead after being spotted in a vineyard to the west of Barcelona on Monday wearing a fake explosives belt.
Police said he had shouted “Allahu Akbar” (“God is Greatest”) and that he was armed with knives.
Tuesday’s hearing took place while Ana Suárez, a woman in her 60s killed in the Cambrils attack, was buried in a private ceremony in Zaragoza.
Forty-five companies in a Catalonia association of undertakers and funeral companies have offered to perform funerals for the victims without charge.
Meanwhile, French Interior Minister Gerard Collomb has confirmed previous reports that some of the alleged attackers made an overnight visit to France days before the attack.