Barcelona (AFP) - In Barcelona's old town, dozens of stunned tourists dressed in shorts and t-shirts stood behind security tape in the early hours, witnesses to the shocking attack on the famous boulevard of Las Ramblas.

Thirteen people were killed and more than 100 injured when a white van sped into the historic promenade, which was packed with tourists, knocking people down in a scene of chaos and horror.

Close to the statue of Christopher Columbus, which depicts the explorer pointing out to sea, a distressed Scottish couple in their sixties who watched the attack unfold studied the security cordon blocking off the street.

"We were sitting on the balcony of the hotel. We saw everything... the car... the panic everywhere," said the man, who did not want to be named, adding that they now could not get back to their hotel.

"The police, they arrived in two minutes, they were very good," the woman said, staring blankly ahead. "We had to talk with them."

As the city was bathed in sunshine hours earlier, Barcelona was shaken by the first attack on Spanish soil claimed by the Islamic State (IS) group.

Its target was the crowd enjoying the summer afternoon, browsing stalls selling flowers and souvenirs along the central pathway of Las Ramblas, an avenue that stretches more than a kilometre towards the sea.

On a narrow street closeby, 45-year-old Benjamin, a Barcelona resident, stood staring at the spot where the van hit a stall.

"Where we can see the forensic police working, in their white suits, that's where the van ran up against a kiosk," said the industrial mechanic.

In the city of 1.6 million people -- where nine million tourists come to stay every year -- several cruise ships were also waiting as passengers tried to return to the pier.

The tragedy took the city by surprise: FC Barcelona was digesting a defeat to Real Madrid, the Catalan government was in the middle of its protracted fight for an independence referendum and security staff were striking at the airport.

Story continues

But the city which hosted the Olympics in 1992 soon rallied in solidarity with those caught up in the devastation.

The strike was suspended, taxis offered rides free of charge and volunteers rushed to donate blood, according to local media.

Hotels close to Las Ramblas welcomed tourists, offering them shelter and blankets.

- Eerie silence -

An eerie silence pervaded the centre of a city that would usually be bustling until the early hours at the height of the mid-August holidays.

"It's a strangely quiet atmosphere," said Remy Gredin, a 23-year-old student from Marseille, finishing dinner at one of the few restaurants open on the Rambla del Raval, a street that runs parallel to the main promenade.

"We are waiting to go back to the apartment we are renting on the Ramblas. The attack happened just below but we had left an hour before to visit the Park Guell," he said as he ate with three French friends.

Beneath the lampposts, road sweepers in fluorescent vests rubbed shoulders with plain clothes policeman.

"It was a matter of time (before an attack in Spain) but we did not know if it would be in Madrid or here," said Juan Manuel Ruiz, a 43-year-old waiter from Barcelona.

"From now on, it will not be the same, and we must not allow just anyone to come in: It is not a question of racism but of keeping order. You are given food, do not come and kill us," he said.

However his colleague Marc de la Iglesia, 29, said "it makes no sense to be alarmed".

"There needs to be a message of unity, we must help the people who have suffered and ensure Barcelona's reputation is not too damaged."

A text message spread from phone to phone with a warning not to share photos of the attack. "That's what they (the attackers) want," it said.

The head of the separatist Catalan regional government Carles Puigdemont meanwhile said: "We will not let a minority put an end to our way of life, which has been forged over centuries. We are and we will always be peaceful and welcoming people."