Cambrils mayor Cami Mendoza noted the "speed and efficiency" of the Catalan police after the attack (AFP Photo/LLUIS GENE)

At least six civilians and a policeman were injured when the vehicle slammed into the crowd in Cambrils (AFP Photo/LLUIS GENE)

Cambrils (Espagne) (AFP) - Markel Artabe had just finished his shift as a waiter in Cambrils and was heading off for an ice-cream when he heard shots: only a few hours after the carnage in Barcelona, the Catalan coast was suffering another attack.

"Between midnight and 12:30am we were on the promenade by the beach," said the 20-year-old, wearing shorts and a sky-blue polo shirt, still shaken after the drama.

"Then we heard shots and thought 'it must be fireworks'... But it was gunshots," said the waiter in the seaside resort 120 kilometres south of Barcelona in the northeastern region of Catalonia.

According to a spokesman for the regional government "suspected terrorists driving an Audi A3 apparently knocked over several people before encountering" a police patrol, and then "the shooting began."

At least six civilians and a policeman were injured when the vehicle slammed into the crowd. One of the civilians injured is in critical condition, emergency services said on Twitter.

The five occupants of the car were killed, the Catalan police said.

Police had earlier said officers had killed "four suspected terrorists." The fifth died from his wounds.

"It was bang, bang, bang. Shouting, more shouting. I threw myself onto the ground on the beach," said another waiter, 21-year-old Joan Marc Serra Salinas, in a restaurant where witnesses to the attack had gathered.

"From what people are saying here, those who carried out (the attack) were people of my age..."

Markel, the other waiter, told AFP he saw someone who appeared to be a foreigner lying on the ground "with a gunshot to the head. His friends were crying out 'help'," he said, although the authorities have not reported any such death.

"I also saw dead bodies that seemed to be terrorists because they were wearing explosive belts."

Cambrils mayor Cami Mendoza noted the "speed and efficiency" of the Catalan police response, at an impromptu press briefing in the street at about 5am (0300 GMT).

The town, like others in the region, was on high alert as the police were hunting the driver of the van in the Barcelona attack, in which 13 people were killed and which was claimed by the Islamic State group.

Police helicopters flew over the town throughout the night.

"We were appalled. It was a long and difficult night," Mendoza said, but gave no details of the attack to journalists, who were behind a security cordon and prevented from approaching the seafront.

Hand in hand, two Spaniards, Rey Perry, 43, and Rocio Ordonez, 26, could not understand how Camrbils could experience such violence, as it's "a quiet tourist place for families, where many walk around with children."

The sun had not even come up but the mayor sought to reassure people: "The situation is under control. In a few hours Cambrils will be back to normal."