FIVE terrorists wearing suicide belts rammed civilians with a car in a Spanish seaside town before being shot dead by police in a second attack to hit the country.

Seven people including a police officer were injured during the incident in Cambrils, hours after a rampaging van driver left 13 people dead and over 100 wounded in Barcelona.

Bystanders ran for their lives as a gunfire broke out close to the coastal town's beachfront promenade early on Friday morning.

Residents of the popular tourist spot were ordered to take cover indoors as bullets tore through the air and footage later showed several lifeless bodies on the ground.

In the wake of the carnage several controlled blasts were carried out in the area, with police later saying the attackers had been wearing explosive belts.

Mossos, Catalonia's police force, said four of the attackers were shot dead at the scene and later confirmed a fifth had died of his injuries.

Of the six civilians caught up in the attack two were said to be in a serious condition.

Investigators said they are working on the theory that the attacks in Cambrils and Barcelona, as well as an explosion in the town of Alancar on Wednesday, are linked.

A major manhunt for the suspected driver of the van that mowed down holidaymakers and locals in Barcelona, around 68 miles east of Cambrils, was continuing on Friday.

So far two people have been arrested over the attack that saw the Catalonia capital become the latest European city to fall victim to a major terrorist outrage.

Shortly after 5pm local time on Thursday a white Fiat van tore through Las Ramblas, a major tourist attraction packed with families and holidaymakers, in a horror described as "jihad terrorism" by the country's prime minister Mariano Rajoy.

The Islamic State terror group has claimed responsibility for the attack, the deadliest on Spanish soil since more than 190 people died in the Madrid train bombs in 2004.