A man has died after being gored by a bull in a Spanish town while taking a selfie on his mobile phone.

Spaniard David González Lopez, 32, had his back to the charging beasts while trying to film the bull run and did not see the one which attacked him until it was too late.

Horrified onlookers watched as he suffered fatal injuries to his neck and thigh in the early hours of Sunday morning.

A video taken of the fatal attack shows Lopez leaving the protected area to wander into the centre of the Villaseca de la Sagra bull running arena as the animals charge past.

While he films a collision between two bulls, one of which appeared to fall unconscious, a third bull runs towards him and gores him in the back, tossing him in the air.

Victim: David Gonzales Lopez died in hospital

It then rakes and tosses him with its horns as he lies helpless on the ground.

Witness Juan Jose Losana said: “He looked like a puppet spinning around in the air because he didn’t fall to the ground.

“He was off-guard and was carried along with the bull. It was an accident.”

Martin Capilla, the first doctor to try to save him, said: “I told his brother when he went to hospital that he was going with a very serious injury.

“He was given two litres of blood before he died.”

Killed: The Spanish victim had been running with the bulls in the early hours of Sunday morning

The town's mayor, Jesus Hijosa, said: "The young man was on the path of a bull run which he was filming with his mobile phone.

“A bull surprised him from behind and gored him in the neck.”

The man was rushed to hospital but died soon after from his injuries.

Villaseca de la Sagra is one of many towns across Spain that host annual festivals where crowds of people run ahead of a herd of bulls.

The animals are taunted as they are let loose to run through the streets, an event which animal campaigners say is cruel and should be banned.

Mr Lopez who lived in nearby Villasequilla, had gone to the bull run with friends.

Tradition: The most popular bull running event happens in Pamplona at the festival of San Fermin where 15 people have died over the years

Villasequilla mayoress Elena Fernandez said: “Friends have said he never took part in the bull runs, that it was just bad luck he decided to record the video on his mobile and leave the protected area and the bull got him.

“It’s a tragic and stupid death.”

The mayor of Villaseca de la Sagra Mr Hijosa warned onlookers to be careful and keep their wits about them to avoid meeting a similar fate.

“This sends shivers down our spine ... we organise these events as a tradition, so that people can enjoy them, but these things happen,” Hijosa said.

“Bulls are dangerous animals and when there are a lot of people some don’t pay attention ... you have to have your wits about you.”

The rest of the festival was immediately suspended.