BARCELONA, Aug. 18 (Xinhua) -- The Spanish police launched an anti-terror operation on Friday as they continued a manhunt on Friday for the driver of a van that was ploughed into pedestrians in Barcelona, killing 13 people in what is suspected to be one of multiple planned attacks.

At least four and possibly five suspects were killed early Friday morning in Cambrils, a town about 120 km south of Barcelona, in a sweeping operation which the police said foiled another terror plot linked to the deadly van attack in Barcelona.

The shootout in the night came as security forces launched a manhunt for the driver of the van that mowed through crowds of tourists on one of Barcelona's busiest thoroughfares Thursday, which also injured more than 100 others.

"We are working on the hypothesis that events in Cambrils respond to a terrorist attack. We have killed its alleged perpetrators," Catalan police wrote on Twitter.

Through social networks, the Barcelona police have asked residents in Cambrils and the adjacent region to stay home to avoid danger.

"If you are in Cambrils, avoid going out. Stay home, stay safe," the police tweeted.

Two suspects, one Moroccan and one from the Spanish north-African enclave of Melilla, have been detained in relation to the attack.

Downtown Barcelona has been sealed off by security forces as the van driver is still at large.

The Islamic State (IS) has claimed responsibility for the massacre.

Images posted on the internet showed that the killed terrorists were wearing what appeared to be explosive belts.

It remains unknown how many people were involved in the van attack and other related incidents on Thursday.

Witnesses describe how the van was going at a high speed, attempting to cause "as much damage as possible" before fleeing the scene.

"I was totally shocked ... I can do nothing but waiting for permission of the police to enter my hotel," said a 16-year-old French girl.

The girl, who required anonymity, said she was just 10 meters away from the van and was frightened into a fit.

It was the worst attack in Spain since March 2004, when Islamist militants placed bombs on commuter trains in Madrid, killing 191 people and wounding more than 1,800 others.

Spanish Prime Minister Mariano Rajoy announced three days of official mourning for what he called a "jihadist attack."

"Today the fight against terrorism is the principal priority for free and open societies like ours. It is a global threat and the response has to be global," he told the media in Barcelona.

Rajoy said he was in "contact with all the administrations," and the priority "is to help the injured and facilitate the work of the security forces."

"This cowardly attack has deliberately targeted those enjoying life and sharing time with family and friends. We will never be cowed by such barbarism," European Commission President Jean-Claude Juncker said in a statement.

"I send my deepest condolences to the families and loved ones of the victims, as well as to Prime Minister Rajoy and the people of Spain. My thoughts are with the people of Barcelona," he added.

U.S. President Donald Trump said: "The United States condemns the terror attack in Barcelona, Spain, and will do whatever is necessary to help."

A Hong Kong tourist was slightly injured in the Barcelona attack, said the Consulate General of China in Barcelona.

All Chinese citizens are advised not to approach the area where the attack happened and those who were close to the area should keep calm and follow police's instructions, the consulate said.