A van attack that killed at least 13 people in Barcelona city centre has been linked to an explosion 100 miles away.
One person was killed in the explosion in the tourist district of Alcanar, about 100 miles (160km) southwest of Barcelona, in the early hours of Thursday - hours before a van attack killed at least 13 people in Barcelona city centre.
TV3 reported that the house blast, in the village of Alcanar Platja, also injured seven people, including some foreigners from France, Italy and Morocco.
:: Barcelona terror attack: What we know so far
Police have since said they suspect those in the house were "preparing an explosive device".
Hours after the van attack in Barcelona, Catalan police said they shot and killed five suspects in response to another terrorist attack in the seaside resort town of Cambrilas.
Catalan authorities say the attacks are linked.
In the Barcelona attack, a white van mounted the pavement of Las Ramblas, the main tourist area in the city, and struck dozens of people on Thursday afternoon.
Catalan authorities have confirmed that at least 13 people have died and more than 100 have been injured but said the number of dead could rise.
Police said they have arrested two people over the attack but they are still hunting the driver of the vehicle, who is said to have fled on foot.
Senior police official Josep Lluis Trapero said, although two are being held "that doesn't mean that either were the author of the attack".
Islamic State said it was responsible, according to the Amaq news agency and Spain's Prime Minister described it as a "jihadist attack".
A statement put out by Amaq said: "The perpetrators of the Barcelona attack are soldiers of the Islamic State and carried out the operation in response to calls for targeting coalition states."
One social media video post showed bodies strewn across the pavement for several hundred metres along the famous street.
At least 18 nationalities are involved, but no Britons have been identified among the injured or dead so far.
:: LIVE: Latest updates on Spanish terror
The government of the Spanish autonomous region announced three days of mourning.
The van used in the atrocity is said to be a Fiat, that was hired from an address in Santa Perpetua Of the Mogoda, about five miles north of the city.
Police initially said they were looking for a man of 5ft 5ins (1.7m) in height, wearing a white shirt with blue stripes.
There was no evidence the person who left the van was armed, Catalonia's interior ministry said.
Police have identified a suspect who they say rented a van, naming him as Driss Oukabir.
A Facebook account says he is from Marseilles and lives in Ripoll, Catalonia, about 50 miles north of Barcelona.
La Vanguadia has reported that the man handed himself in to the police station at Ripoll after he saw his photo in the media, claiming his documentation had been stolen and that he was in Ripoll at the time of the attack.
Two people have been arrested and neither of them is the driver of the van, but the investigation is ongoing.
The arrests took place in Ripoll and Alcanar.
The two who are being held are a Spanish national from the country's African enclave of Melilla and a Moroccan.
:: 'I saw a woman screaming for her kids'
Security forces have found a second van connected to the attack in the town of Vic, 40 miles from Barcelona, 18 miles south of Ripoll, according to police sources.
Catalan police have confirmed a driver ran into two police officers at a checkpoint in Sant Just Desvern, about five miles west of Las Ramblas, at 7.24pm local time, but it is not known if it is linked to the attack.
Media reports said a white Ford Focus ran over the officers and police said a vehicle was intercepted by police nearly six miles (10km) away.
A senior police official confirmed that regional police troopers shot and killed the driver.
A witness watched as police surrounded a vehicle in Sant Just Desvern and shouted "raise your hands, raise your hands", before he heard one or two shots, according to another report in La Vanguadia.
Carlos Mauri, a resident on the eighth floor of a building overlooking where a vehicle was parked, told the newspaper: "Suddenly I heard screams. I thought it was a fight and I went out on the balcony. There was a lot of police and they were shouting to the man of the vehicle."
He said afterwards a robot was dispatched to help examine the vehicle.
The bomb squad are said to have been checking an area in the Barcelona outskirts.
Numerous people were trapped in shops after being told to hide but have since been evacuated.
Metro and train stations have been closed and a large area has been cordoned off.
Barcelona mayor Ada Colau said a minute's silence will be held on Friday at midday at Placa Catalunya.
The Foreign Office released a statement saying: "The British Embassy in Madrid and Consulate General in Barcelona are in contact with local authorities and urgently seeking further information following reports of an incident in central Barcelona.
"Local authorities have advised people to stay inside and stay away from the Las Ramblas area of the city. If you're in the immediate area you should take care and follow the advice of the local security authorities."
:: Catalonia's interior ministry has provided a number for anyone worried about relatives, advising people to call +34 900400012.