Footage has gone viral on social media showing a man climbing on top of a plane as it prepared for take-off.

The unidentified 24-year-old Moroccan man managed to get on the roof of the Vueling Airbus A320 in Valencia.

He was on top of the plane for around 10 minutes, sprinting up and down the length of the aircraft, drinking from a bottle and taunting staff on the ground.

He eventually came down after being convinced by three Civil Guard officials and was taken to a psychiatric unit for evaluation. The plane was delayed on its journey to Amsterdam for two and a half hours.