Mohamed Houli Chemlal, a 21 year-old, who survived an explosion last week that destroyed a house where officials say explosives were being prepared, testified earlier Tuesday.
Catalan Interior Minister Joaquim Forn told Catalunya radio that "everything indicates" Younes Abouyaaqoub was behind the wheel of the van during Thursday's Barcelona attack that killed 15 people.
Besides the four men detained, the rest were killed, either by police or in the explosion in Alcanar.
The four living members were facing the National Court in Madrid on Tuesday.
The court ruled that all four men should be unconditionally imprisoned pending a full trial.
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 IS hallmark -had been found at their bomb factory. Authorities did not confirm speculation that they were targeting the Sagrada Familia cathedral.
Earlier, the Spanish police confirmed that the suspected driver behind the Barcelona terror attack, Younes Abouyaaqoub has been shot dead, putting an end to the worldwide manhunt for Europe's most-wanted man.
A person who attended proceedings at Spain's National Court says attack suspect Driss Oukabir told the prosecutor he had rented the vans used in last week's attacks - but says he did that because he thought they were going to be used for a house move.
He turned himself in to police, protesting his innocence and saying his younger brother, Moussa Oukabir, 17, who was killed in Cambrils, had stolen his documents.
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. They told the court that the imam planned to self-immolate after a bomb attack on a Barcelona monument. The imam was among those killed in the explosion at the bomb-making facility. Five apparent cell members were shot dead by police after they rammed a vehicle into pedestrians in the resort town of Cambrils, got out and tried to stab people wearing fake explosive belts.
Collomb said French and Spanish services were in tight cooperation over the attacks, but the French "didn't know the cell which was exclusively Spanish".
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.
While on the run, the 22-year-old stabbed to death the driver of a auto he hijacked to get away.
Police said that with Abouyaaqoub's death, the group responsible for last week's fatal attacks are all dead or in custody.
The Islamic State group claimed responsibility for the van attack and a separate deadly assault, hours later, in the coastal resort of Cambrils, south of Barcelona.
Also in court was Mohammed Aalla, the alleged owner of the Audi A3 used in the Cambrils attack.
Spanish police have sought information from Belgian authorities on a visit the imam, Es Satty, made there a year ago.