A car has hit pedestrians in the coastal town of Cambrils, some 100km from Barcelona, injuring at least six people. Five suspected terrorists were killed during a shootout with police, authorities said, adding that the attackers wore fake bomb belts.

“We have killed the alleged perpetrators,” Catalan police announced on Twitter. “We work on the hypothesis that the events of Cambrils respond to a terrorist attack.”

Authorities are now working to determine if the alleged terrorists wore explosive belts, police tweeted.

In few minutes we are going to make several controlled explosions in #Cambrils. If you hear detonations DO NOT be alarmed, are controlled! — Mossos (@mossos) August 18, 2017

Six civilians and one officer were injured in the attack before police neutralized the suspects. Two of the injured remain in a serious condition.

El Pais reports that four terrorists were traveling in a car and managed to run over several people before being shot dead by security forces. Police then intercepted the fifth attacker who was on foot. The man was injured and immediately detained. He later succumbed to his injuries.

"We work on the hypothesis that terrorists killed in Cambrils would be related to the events registered in Barcelona and Alcanar," Catalan authorities tweeted.

In a brief late night address, the mayor of Cambrils, Camí Mendoza, thanked police for the rapid deployment and effective work and said she expects the Interior Ministry to provide full details of the incident in the morning.

Police operation in #Cambrils for possible terrorist attack. If you are now in #Cambrils avoid going out. Stay home, stay safe — Mossos (@mossos) 17 августа 2017 г.

Explosive belts worn by terrorist suspects killed in Cambrils were fake, Reuters cited Catalan's regional head Carles Puigdemont as saying.

Earlier police told residents of Cambrils to “stay home and stay safe,” announcing on Twitter that a "police operation" was ongoing in the town.

LIVE UPDATES: Van smashes into pedestrians in central Barcelona

Cambrils is a coastal town with about 33,000 inhabitants and is a very popular tourist destination. The incident played out on a crowded seafront promenade at 1am Friday morning.

Ahora mismo en #Cambrils (no son imágenes fuertes, solo se escuchan tiros). Primero en frente de mi casa y ahora en la de mis padres... pic.twitter.com/HFC6DtqIlu — Eric 'Diablo'Murillo (@DiabloEMT) 17 августа 2017 г.

As authorities urged residents to “avoid the streets and lock themselves in the house,” locals in the area told La Vanguardia that people were also taking shelter in nearby hotels.

Follow the information of OFFICIAL SOURCES and DO NOT spread false rumours. Thank you for your collaboration #Cambrils — Mossos (@mossos) 18 августа 2017 г.

Police have also urged the public and media to rely on official information and to avoid spreading rumors after several false reports emerged of alleged terrorism-related incidents in other parts of Spain.