In the past 24 hours terrorists have struck twice in Spain. Shortly before 5 p.m. local time yesterday a white van ploughed into pedestrians on the Las Ramblas boulevard in Barcelona, killing 14, then in the early hours of Friday morning another car drove into a group of people on the Spanish coast in Cambrils.
Here is a timeline of how events unfolded, with hours given in local time:
4:50pm A white van drives into crowds on the Las Ramblas, a famous 1.2km boulevard in Barcelona popular for its market stalls. The driver is said to have zigzagged through the crowd at a high-speed, deliberately targeting pedestrians, the BBC reported.
5:09pm Police in Barcelona tweeted to say that there was a serious incident in the central square of Plaza Catalunya, asking people to stay away from the area.
5:20pm Witness reports start coming in from the scene. Steven Turner, who works in the area, told the BBC that he saw three or four people laying in the ground and his colleagues saw a van ramming into people."There are lots of ambulances and armed police with assault rifles around now."
6:08pm The police in Barcelona tweet to say that they were searching for the driver of the van. "Don't get close to the affected area," they urged.
6.50pm Police sent another tweet to confirm that the incident was a terrorist attack.
8pm Facebook activates its safety check feature to let people in the area tell their friends and family they are safe.
8:18pm Spanish officials confirm that 13 people have been killed in the attack and say that at least 50 people have been injured.
8:19pm Police announce that they have arrested one man in connection to the attack. At the same time they dismiss rumours that a group of attackers had taken hostages in a bar.
9:27pm Catalonia's regional official confirms at a press conference that two people had been arrested in connection with the attack, adding that 80 people had been sent to hospital. On Twitter, police also say that a driver ran into two police at a check-point earlier on Thursday.
9:30pm Islamic State claim responsibility for the attack through their news agency Amaq.
11:16pm Police announce the attack in Las Ramblas may be connected to an explosion in a house in Alcanar, about 126km south of Barcelona, on Wednesday evening. The blast killed one person and injured seven more. According to Spanish newspaper, El Pais, bottles of propane and butane were found at the site.
1:03am Spanish Prime Minister Mariano Rajoy says the attack was terrorism. He told a press conference: "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."
1:15am Police tell people in the town of Cambrils to stay inside because a police operation is taking place, adding that it is related to a "possible terror attack."
1:57am Police confirm that the incident was terror related and that the suspects have been shot.
2:09am Spanish media report that four attackers have been shot dead by police in Cambrils after a van attempted to drive at pedestrians. Cadena Ser added that one attacked may still be alive.
2:56am Police say that the situation in Cambrils is under control but urge people to exercise caution.
2:59am Spanish newspaper El Pais reports that a policeman was injured in Cambril, and that the attackers shot dead appeared to be wearing explosives. La Vanguardia newspaper reports that the men were armed with guns.
3:07am Police confirm that the attack in Barcelona, the attack in Cambrils and the explosion in Alcanar are linked.
3:45am Catalonian emergency services confirm that six civilians and a police officer were injured in the Cambrils attack. One in a serious condition.
3:52am Spanish civil protection agency announces that the Barcelona injured and dead were from at least 24 different countries, including France, Germany, Spain, Netherlands, Argentina, Venezuela, Belgium, Australia, Hungary, Peru, Romania, Ireland, Greece, Cuba, Macedonia, China, Italy and Algeria.
9:29am The explosive belts worn by the attackers in Cambrils were fake, Reuters report.
10:37am Spanish police say their search for the driver is focusing on 17-year-old Moussa Oukabir, reportedly the brother of Driss Oukabir, whose documents were used to rent the van.
10:51am The first victims of the attacks are named. 57-year-old Francisco López Rodríguez was from Granada, his wife is seriously injured and her niece and youngest son were reportedly also killed.
12.30pm Police say a woman caught up in the Cambrils attack has succumbed to her injuries, increasing the total fatalities to 14.
1.42pm Police confirm that they have arrested a fourth person in relation to the two attacks.
3.00pm Police release a new statement to say that none of the arrested people had a criminal history relating to terrorism. The four that have been arrested include one Moroccan and one Spanish national. The youngest was 21, and the others are 27, 28 and 34.
3.18pm The attackers in Cambrils had an axe and knives in their car, Spanish police report. They struck one man in the face before being shot.
5.15pm Four of the victims have so far been identified. Read more about them here.