A massive manhunt is under way in Spain for the man suspected of killing 13 people and injuring scores on Barcelona's Las Ramblas on Thursday.
Spanish media named the man being sought as 18-year-old Moussa Oukabir.
He is suspected of using his brother's documents to rent the van that mowed down people on the famous boulevard.
Hours later, police killed five suspected jihadists in a second vehicle attack in the town of Cambrils. A woman injured in that attack died later.
Police said the men killed in Cambrils were linked to the Barcelona attack, which the Islamic State group said it had carried out.
Spanish Prime Minister Mariano Rajoy condemned what he called a "jihadist attack" in Barcelona. He has announced three days of national mourning and a minute's silence was held at noon (10:00 GMT) on Friday.
What lines of inquiry are police following?
Police say they are investigating the hypothesis that the attacks were being prepared over a substantial period of time in a private house in Alcanar, a small town south of Barcelona.
Explosions ripped through the building on Wednesday evening, apparently caused by exploding gas canisters. One person was killed.
The explosives were apparently being prepared for use in one or more attacks in Barcelona, police said.
Catalan Police Chief Josep Lluis Trapero said the actual attacks in Barcelona and Cambrils were "rudimentary" in comparison.
Who is being sought?
Spanish media have quoted police as saying that they are seeking Moussa Oukabir, but they will not say directly that he is the man believed to have been behind the wheel of the van.
Two images of Moussa Oukabir have been used in the Spanish press, taken from social media.
The driver of the van fled on foot after mowing down tourists and locals on Las Ramblas.
Catalonia's Interior Minister Joaquim Forn, quoted by the Associated Press, said: "We had local police on the scene, but we were unable to shoot him, as the Ramblas were packed with people."
Spanish media say Moussa Oukabir rented two vans, the one used in the attack and another found hours later in the town of Vic, north of Barcelona, and intended as a getaway vehicle.
His brother, Driss Oukabir, was arrested after reportedly turning himself in on Thursday.
Reports suggest Driss, who is in his 20s and was born in Morocco, told police he was not involved and that his documents had been stolen.
Three other arrests have been made. Two of the men are Moroccan, and the third was born in Melilla, the autonomous Spanish city on the north coast of Africa.
Police said three of the arrests were made in the Catalan town of Ripoll and one in Alcanar after Wednesday's explosions.
They gave the ages of the arrested men as 21, 27, 28 and 34.
What happened on Las Ramblas?
A Fiat van was driven down the pedestrianised avenue on Thursday afternoon, weaving from side to side and deliberately targeting people.
Las Ramblas is a central boulevard that runs 1.2km (0.75 miles) through the centre of Barcelona from the city's Plaça de Catalunya (Catalonia Square) to the Christopher Columbus monument at the seafront.
A businessman from New Orleans who was just arriving in a taxi in Las Ramblas, said the van was "weaving left and right, trying to hit people as fast as possible. There were people lying on the ground".
Kevin Kwast, who is on holiday in Barcelona with his family, said: "Hundreds of people started stampeding through the market... we started running with them going outside right into where casualties were already on the ground."
What happened in Cambrils?
Seven people, including a police officer, were hit when a car was driven into them early on Friday, Catalan emergency services said.
A woman was later confirmed dead.
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 what appeared to be 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.