The driver in Thursday's van attack that killed 13 people in a tourist area of Barcelona may still be alive and on the run, Spanish police say.
They are hunting for Moroccan-born Younes Abouyaaqoub, named by Spanish media as the suspected driver.
A man previously reported as the key suspect, Moussa Oukabir, 17, was one of five men killed by police after a later attack in Cambrils, west of Barcelona.
Police say the suspects had been planning more sophisticated attacks.
They said blasts on Wednesday in the town of Alcanar deprived plotters of bomb material so they carried out simpler attacks using vehicles.
Abouyaaqoub, 22, lived in the town of Ripoll to the north of Barcelona. Three people were arrested in Ripoll and one person in Alcanar on Friday.
Oukabir had previously been seen as the main suspect - but late on Friday police chief Josep Trapero told local TV that the theory that he was the driver now "had less weight".
El Pais newspaper said there was a growing belief that Abouyaacoub was the main suspect.
Oukabir is suspected of using his brother's documents to rent the van used in the Barcelona attack and another found hours later in the town of Vic, north of Barcelona, that was intended as a getaway vehicle.
In the early hours of Friday police shot dead five attackers including Oukabir in Cambrils after they drove a car into pedestrians killing one woman and injuring six others.
The attackers' vehicle overturned and when the men got out they were quickly fired upon by police. One was reportedly brandishing a knife.
Police chief Trapero said one officer killed four of the attackers single-handedly.
The men were wearing what appeared to be explosive belts, police said, but these proved to be fake.
Police have named three of the five attackers in Cambrils - Said Aallaa, 18, Mohamed Hychami, 24, and Oukabir.
Oukabir's brother Driss was among the three people arrested in Ripoll. He reportedly turned himself in, telling police he was not involved and that his documents had been stolen.
Thursday's attack occurred when a Fiat van was driven down the pedestrianised Las Ramblas area on Thursday afternoon, killing 13 and injured scores more people.
ONLY FOUR OF THE DEAD HAVE BEEN NAMED SO FAR:
#American Jared Tucker, 43
#Canadian Ian Moore Wilson
#Spaniard Francisco López Rodríguez, in his 60s
#Italian Bruno Gulotta, 35
#Italian Luca Russo, 25
A 74-year-old Portuguese woman, a 40-year-old woman with dual Argentinian and Spanish citizenship and a Belgian were also killed, their governments said.
Seven-year-old Julian Cadman, a dual British-Australian national who was separated from his mother during the attack, is missing, ABC Australia reports. His mother was reportedly among the seriously injured.
The Islamic State (IS) group said it had carried out the attacks, though it is not clear whether the attackers were directly connected to the group or simply inspired by it.
WHAT IS THE TIMELINE OF EVENTS?
#Alcanar, Wednesday evening: An explosion rips through a house in the small town, 200km south of Barcelona. One person dies. Police chief Josep Lluis Trapero said it appeared the residents at the house had been "preparing an explosive device". A Catalan government official says a cell may have intended to use gas canisters in the Las Ramblas attack
#Barcelona, Thursday 16:50 (14:50 GMT): A white Fiat van drives down Las Ramblas in central Barcelona, killing 13 people and injuring scores. The driver flees on foot
#Vic, Thursday 18:30: Police find a second van, thought to be a getaway vehicle, in the town, 80km north of Barcelona
#Sant Just Desvern, Thursday 19:30: A car is driven into officers at a checkpoint on the outskirts of Barcelona. A man is found dead in the car but the interior ministry denies earlier reports he was killed by police gunfire. The dead man is not believed to be linked to the Las Ramblas attack, officials say, but investigations are ongoing
#Cambrils, Friday 01:00: A second vehicle attack takes place in the resort south of Barcelona. Police kill five terrorist suspects said to be linked to the Las Ramblas attack