Catalan police say they have killed four perpetrators and injured one during a shootout in Cambrils, 100km from Barcelona, to prevent what they say was a second terror attack.

Police said the that the shootings were linked to a suspected imminent terror attack and came only hours after a horrific attack in Las Ramblas killed at least 13 and left dozens injured.

Spanish broadcaster RTVE reported that the suspects had attempted to carry out a similar attack to the one in Barcelona by driving a van at pedestrians. It reported seven people were injured, including two seriously.

The newspaper El Pais said that one of the injured was a police officer, while La Vanguardia said that the men were armed with guns. Police have not yet searched the van for fear the attackers had suicide vests.

La Vanguardia said the group was found during a security check in the port area and after a short chase, the attackers' van overturned. They were fired upon by police when they got out.

Emergency services said the situation in Cambrils remains "exceptional" and urged people in the town to be patient with some roads closed. However at 3am local time on Friday morning (18 August) the police said that the situation was "under control".

Coordinated attack

Catalan police say that although investigations continue in Cambrils, "the situation is under control", adding that they would conduct "several controlled explosions".

Cambrils is a popular tourist destination for holidaymakers on Catalonia's Costa Daurada, or Gold Coast and is about an hour's drive south of Barcelona. It is a port city with a population of 33,000 and is around 10km from PortAventura World, the most popular theme park in Spain.

It was an attempt at a coordinated attack across the region with police saying that an explosion on Wednesday night (16 August) in which a house in Alcanar, 180km south of Barcelona, was destroyed, was also linked to the Las Ramblas attack as was the shootout in Cambrils.

It was initially believed to be due to a gas explosion and it left one dead, several injured and damaged neighbouring buildings.

Josep Lluis Trapero, head of the Mossos police, said there was a link between the occupants of the house and the attack, with police finding around 20 canisters of butane and propane gas.

Barcelona
A damaged van, believed to be the one used in the attack, is surrounded by forensics officers in the Las Ramblas area of Barcelona. Hours later police say they thwarted another terror attack in the town of Cambrils.Getty
Catalan police tweeted regular updates