Images of the landing were published on social media and quickly went viral.
In the images you can see the plane, which was carrying around 90 passengers, approaching the Madeira runway and even touching the runway with a wheel.
It is now known that the plane had to be diverted to Las Palmas, in the Canaries, where it ended up landing safely.
The flight that was destined for Madeira ended up being carried out later, using another plane.