Barcelona and Cambrils attacks: Eyewitnesses describe fear
Spanish police say they have shot dead five suspected terrorists in the town of Cambrils in a second vehicle attack, after an earlier incident in Barcelona killed 13 people and injured dozens.
The city is a popular tourist destination for holidaymakers and a number of tourists caught up in the attacks have been speaking to BBC News about their ordeal.
Kevin Kwast from Texas in the US, is on holiday with his family in the city. He said: "I was eating with my family in La Boqueria market very near where the first crash occurred."
"Hundreds of people started stampeding through the market running south east. We started running with them going outside right where casualties were already on the ground near Maccabi restaurant.
"A smaller crowd was running away from that scene to the north west. We got trapped between the crowds and the heavily-armed police running around the area.
"Police pushed us into a money transfer shop and we were sheltering there for over an hour."
Running to safety
"My friends and I were in a shop near Las Ramblas when we were told of the attack," said Robert Yelito from Texas who was in a pop-up shop.
"At first we were locked in the store then we were allowed out.
"Everyone was outside trying to find out what happened then a stampede began.
"We ran into a random apartment."
Richard Gregg from Kent, UK describes the confusion moments after the attack: "We were just waking into Las Ramblas as the crash happened."
"Half the crowd didn't know what was going on but others were shouting about someone driving into the crowd. There was a woman shouting 'there's blood everywhere'.
"People understood it was serious given the number of police piling into the area.
"The police were arriving at the scene from surrounding roads. When we got there the place was swarming with officers.
"In less than five minutes it was clear it was something serious. That set up a chain reaction. There was a bit of a panic.
"We made our way to our apartment as police were clearing Las Ramblas.
"Within minutes there were police officers running and driving through the streets obviously looking for someone.
"We could see the emergency services on Las Ramblas. Shops were shutting down and people running to get away.
'Bodies in the road'
Stephanie Walton from Lincoln, UK was in a bar on Las Ramblas when she noticed a crowd running towards her.
"I heard a loud bang followed by screaming while I was having a drink with my boyfriend," she said.
"A crowed rushed towards me and it was mayhem. I wanted to run, but my boyfriend who is ex-military said to stay put.
"We went into the cafe and hid in the corner. I could see bodies in the road before we closed the shutters.
"Two local boys offered me some water. When I told them what had happened they burst into tears."
Feeling of fear
Katie K is on holiday with her friends in Barcelona. She says she felt overwhelmed by what had happened.
"We were heading to the shops and everything got very busy. We went into one and the security guard closed the doors.
"We were confused as to what was happening. The guard then let us out of the shop.
"There were lots of ambulances and people screaming, as well as helicopters. The roads started to clear, and we started to worry.
"We went to get a drink from a supermarket. When we came out people started to run towards us.
"Feeling very scared, we ran away from the crowd not knowing yet what had happened.
"We looked up and realised a van had driven into the crowd.
"We are still shaken. We were told tourists should stay inside."
Scott Strudwick and his family from Jersey were in a shop when it was evacuated. He said: "We were in the Placa De Catalina when people started fleeing the street as we heard a large number of police sirens."
"Police then ushered us into shops and we went in to El Corte Ingles shopping mall on the Placa.
"Then there was panic in the shop as there were rumours that there was gunfire in the shop. There was more panic when we were ushered to the back of the shop. We ran to hide in a store room.
"People were crying and on their phones trying to understand what was happening.
"It was very frightening for our young children.
"We were ultimately evacuated out of a side exit of the shop, and then there was more confusion as we didn't know where we were.
The police ushered us away from the area, but we did now know how to get back to our hotel."
Second attack in the town of Cambrils
As people were still coming to terms with what had happened at Las Ramblas, a second attack was foiled in the nearby town off Cambrils in the early hours of Friday morning.
Spanish police shot dead five suspected terrorists. 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.
Fitzroy Davies from Wolverhampton in the UK is on holiday with a group of friends. One of whom was hit in the leg by shrapnel.
"We were sitting at a bar when three girls came running in with fear on their faces.
"Next thing one guy stood up and said 'look down the road - run!'.
"I thought it was a hoax so I started filming. But then I saw the guy halfway down the road with things strapped to his chest. Someone was shouting at him. Then the attacker ran at everybody.
"The police came and started shouting at the guy. They shot him several times and he fell over - he stood back up and the police shot him again.
"He was smiling at them when they shot him."
People in hysterics
Miquel Murriadamas, from Cambrils, was having a drink with some friends outside a bar.
"People started running and shouting for us to get up and leave. At first I wasn't sure what was happening, I thought it might have been an accident.
"Then I saw a man walking towards us with his arms up and what looked like an explosive belt on.
"Suddenly a car pulled up and two agents got out and they shouted at him to stay still. He kept walking forwards and there was gunfire.
"He stayed still and then started to walk forwards again. There was another blast of gunfire.
"We were moved into the bar and those who could watched through the windows. I was actually pretty calm because I could see that the situation was under control and there were enough people in hysterics.
"We had to stay there for two and a half hours and then we left with the police."
By Rozina Sini, BBC's UGC and Social News team