Here is what we know about the men, many of them brothers, who are thought to have planned and carried out the vehicle rampages in Barcelona.
Here is what we know about the men, many of them brothers, who are thought to have planned and carried out the vehicle rampages in Barcelona and the seaside resort of Cambrils that left 15 dead and over 100 injured.
None were known to police for terror-related acts, though some had been involved in petty crime.
Moroccan, in his late 20s. He was arrested Thursday in Ripoll, a town in northern Catalonia where many of the suspects grew up.
His passport was found by police in the van that ploughed into crowds in Barcelona, leaving 13 dead in its wake. He says his ID was stolen.
Moroccan, 27, also arrested in Ripoll. Owns the Audi A3 used in the Cambrils attack. His father told AFP he used to lend it to his younger brother Said, who was killed in Cambrils.
Mohamed Houli Chemlal
A Spaniard born in Melilla, a Spanish territory in northern Morocco, thought to be 21.
He was injured in an explosion believed to have been accidentally detonated by the suspects themselves in their makeshift bomb factory in the seaside town of Alcanar.
Salh El Karib
Moroccan, in his 30s. He was also arrested in Ripoll. A friend of Driss, he manages a store that allows people to make calls abroad.
For several days the 22-year-old Moroccan became Spain's most wanted man as the on-the-run driver of the van that ploughed through crowds in Barcelona, killing 13 people.
He is also suspected of having stabbed to death 34-year-old Pau Perez after hijacking his car to make a getaway.
Abouyaaqoub was shot dead by police on Monday after he was sighted in a village not far from Barcelona.
Abdelbaki Es Satty
An imam in Ripoll, 44-years-old. He is suspected of having radicalised the young men in the terror cell.
He died in the explosion in Alcanar, police have confirmed.
He had been in jail for drug trafficking from 2010 to 2014, police said.
He also spent time in the Brussels suburb of Machelen between January and March 2016.
Described by those who knew him as a discreet and religious man, he had recently asked for a holiday from the mosque he was preaching in, apparently to return to Morocco for personal business.
Initially thought to be the Barcelona attacker, the 17-year-old Moroccan was killed by police in Cambrils after the car he was in hit pedestrians before one suspect jumped out and stabbed a woman, killing her.
Moroccan, 24-years-old. He was also killed in Cambrils.
Mohamed's brother, he was also shot in Cambrils. His age has not been released.
Moroccan, 18-years-old, one of the men killed in Cambrils. It would have been his birthday on August 25.
"A friend apparently called him on Thursday at 3:00 pm (1300 GMT) and he went out for a drive," Yasmila, a neighbour in Ripoll, told AFP. The Barcelona attack took place at 4:50 pm.
The younger brother of Younes, the Barcelona attacker.
An adept climber and skier according to pictures on social media published by Spain's La Sexta television, he too was probably radicalised.
He was also killed by police in Cambrils.
He has been confirmed dead by police.
It is still unclear how he died but he is believed to have been killed in the explosion in Alcanar.