A woman who was critically injured in a terror attack in the Spanish town of Cambrils last night has died.

Five attackers with fake explosive belts were killed by police in the resort town overnight after they drove a car into a crowd of people.

Seven people were injured when "alleged terrorists" drove an Audi into pedestrians in Cambrils, a tourist city 120km south of Barcelona, early today.

Police shot four of the attackers dead and a fifth later died of his injuries.

A police official this afternoon said that one of the five killed in Cambrils could have been the driver of the van which killed 13 people in Barcelona.

Pic: Google Maps

The attack in nearby Barcelona, where a van had sped into a street packed full of tourists, also left more than 100 others injured.

"The alleged terrorists were in an Audi A3 and apparently knocked down several people before coming across a police patrol and a shoot-out ensued," said a spokesman for the regional government of Catalonia, where Cambrils is located in Spain's northeast.

Markel Artabe, a 20-year-old restaurant worker, said he was on the seaside promenade when he heard what he initially thought were fireworks, but soon realised were gunshots.

Joan Marc Serra Salinas, a 21-year-old waiter, said he heard many gunshots.

"And shouting. And more shouting. I jumped onto the beach and didn't move," he said.

Read more:

Police said they were "working on the hypothesis that the terrorists shot dead in Cambrils could be linked to what happened in Barcelona".

The driver of the van in the Barcelona attack managed to escape and is still on the run.

Spanish authorities believe there may have been eight people involved in a cell which carried out the attack in Barcelona, and that the group had planned to use butane gas canisters, a judicial source with knowledge of the investigation said.