Four alleged members of a terror cell accused of killing 15 people in attacks in Spain are being interrogated in court, a day after the last missing member of the group was shot dead by police near Barcelona.

The four men were arrested last week for their alleged involvement in the planning or execution of attacks in Barcelona on Thursday and the north-eastern resort town of Cambrils early on Friday.

They are giving evidence in Madrid before National Court Judge Fernando Andreu, who will decide whether they should be jailed or released.

Spanish media have named the suspects as Driss Oukabir, Mohammed Aalla, Salh el Karib and Mohamed Houli Chemal.

Chemlal, 21, was arrested in eastern Spain last week. He was the lone survivor of a blast that destroyed a house in Alcanar, where police believe the cell was preparing explosives.

Oukabir, Aalla and el Karib were arrested on Thursday in the north-eastern town of Ripoll.

Spain terror attacks key locations mappedSpain terror attacks key locations mapped (PA graphic)

Police said they had “scientific evidence” that the fugitive, Younes Abouyaaqoub, 22, was driving the van that barrelled through Barcelona’s crowded Las Ramblas promenade, killing 13 people on Thursday, then hijacked a car and fatally stabbed its driver while making his getaway.

Abouyaaqoub’s brother and friends made up the rest of the 12-man extremist cell, along with an imam who was one of two people killed in the Alcanar house.

Police said that with Abouyaaqoub’s death, the group responsible for last week’s fatal van attacks has now been broken.

A spokeswoman for prosecutors said the four suspects would be interrogated in the presence of lawyers provided by the court throughout the day. She said the testimony would be in Spanish without interpreters.

The lone fugitive from the cell was killed on Monday after he flashed what turned out to be a fake suicide belt at two officers who confronted him in a vineyard not far from the city he terrorised.

Police said they had “scientific evidence” that the fugitive, Younes Abouyaaqoub, 22, drove the van that barrelled through Barcelona’s crowded Las Ramblas promenade, killing 13 people, then hijacked a car and fatally stabbed its driver while making his getaway.

AudiThe Audi used in the terrorist attack on Las Ramblas (Emilio Morenatti/AP)

Abouyaaqoub’s brother and friends made up the rest of the 12-man cell, along with an imam who was one of two people killed in the Alcanar house.

Police said that with Abouyaaqoub’s death, the group responsible for last week’s fatal attacks are all dead or in custody.

Five of the 12 were shot dead by police in the seaside town of Cambrils, where a second van attack left one pedestrian dead hours after the Barcelona attack.

The Islamic State group has claimed responsibility for the Cambrils and Barcelona attacks.