Mossos d’Esquadra, the Catalan police force, killed four out of the five attackers on the spot, a BBC report said.
This was after they ploughed a car into several people on the street in the popular seaside resort to the south-west of Barcelona, injuring six, including one police officer.
The fifth attacker later died after being injured.
Police said their technical teams were working to determine whether the alleged terrorists in Cambrils were wearing explosive belts, the CNN said.
Earlier reports said the terrorists were carrying explosives attached to their body. They were driving along a street near a yacht club after ramming into the crowd, when they were intercepted by the police team.
In the chase the attackers’ vehicle appeared to have overturned, Efe news reported.
When the terrorists tried to escape their vehicle, the shootout occurred. The injured suspect tried to escape but was arrested by the police.
Thirteen persons were killed and many injured in the Barcelona attack when a van ploughed into crowds in Las Ramblas area on Thursday afternoon. The driver of the van fled and is still at large.