The Spanish city of Barcelona was rocked by a brutal terror attack on 17 August when a van ploughed through pedestrians, leaving 13 people dead and dozens injured.

A second attack took place in the coastal town of Cambrils, 120km from Barcelona where a car ran into people on the street. Police were able to shoot and kill five suspects, who were reportedly wearing explosive belts.

As the country and the world reels from this latest bloodshed, celebrities and sports personalities took to Twitter to offer their condolences to those affected and to express their love and best wishes.

Spain terror attack
People leave a cordoned-off area after a van ploughed into the crowd, killing and injuring several people on the Rambla in Barcelona on 17 August, 2017 PAU BARRENA/AFP/Getty Images

"Sending you much love and peace to the great city of Barcelona and all its beautiful people," Jennifer Lopez posted in Spanish, while Antonio Banderas also opted to tweet in the language, writing, "A big hug to #Barcelona."

Footballers Gareth Bale, Cristiano Ronaldo and Lionel Messi – who play for Spanish clubs – were among some of the sportspersons who also voiced their concern while condemning those responsible for the attack.

"I want to send my condolences and all my support to the families and friends of the victims of the terrible attack in our beloved Barcelona," Messi wrote on Instagram.

"We are not going to give up. There are many more of us who want to live in a world of peace, without hate and where respect and tolerance are the bases of living together," the Argentinian added.