Spanish police say they have shot dead five suspected terrorists in the town of Cambrils in a second vehicle attack, after an earlier one in Barcelona killed 13 people and injured dozens.
The men were linked to the Barcelona attack, police say.
Police are still hunting the man who drove his van into crowds on Las Ramblas in Barcelona on Thursday.
Spain’s PM Mariano Rajoy described it as a “jihadist attack”, which so-called Islamic State said it had carried out.
Mr Rajoy has announced three days of national mourning and a minute’s silence will be held later on Friday.
Seven people, including a police officer, were wounded when a car was driven into them early on Friday, Catalan emergency services said. One person is in a critical condition.
The attackers’ vehicle overturned and when the men got out they were quickly fired upon by police, media say. One was reportedly brandishing a knife.
The men were wearing explosive belts, police said, and a series of controlled explosions was carried out. The belts proved to be fake, Catalan regional head, Carles Puigdemont, later told local radio.
Police say the situation in Cambrils – a popular seaside resort 110km (68 miles) south-west of Barcelona – is now under control.
Citizens of some 24 countries were killed or injured in the Las Ramblas attack, the Catalan government has said.
One Belgian national has been confirmed dead.
France’s foreign ministry said on Friday that 26 French nationals were injured, with at least 11 in a serious condition.
A five-year-old Irish boy suffered a broken leg.
Hong Kong, Taiwan and Greece are among those saying their citizens were injured. German, Pakistani, Philippine, Venezuelan, Australian, Peruvian, Dutch, Algerian and Chinese nationals were also among the casualties, officials said.