Spanish police suspect a total of 12 people were part of a group behind terror attacks that left 14 dead and more than 100 injured in Barcelona and the coastal town of Cambrils, investigators said Friday.

A majority of the members are Moroccans according to police, who said three of five suspects shot dead in Cambrils were nationals of the North African country. Three other Moroccans and one Spaniard have also been detained.

The Islamic State militant group has claimed responsibility for the Barcelona attack.

Several local media said the suspect who drove a van through a crowd of pedestrian in the center of Barcelona on Thursday was among the five suspects who have been shot dead by police, but the police said it has not been confirmed.

About seven hours after the attack in Barcelona, suspects rammed a car into police in Cambrils, some 120 kilometers southwest of Spain's second-largest city, killing one pedestrian and injuring six.

Two other suspects have also been found dead following a blast Wednesday at a house in Alcanar, some 150 km southwest of Barcelona. According to police, the terrorist group had used the house as a place to hide and manufacture weapons.

The group had apparently planned to conduct a series of terrorist attacks in Barcelona, with a suspect mistakenly detonating an explosive and destroying the residence, police said.