(CNN) -- An Alitalia aircraft was forced to make an emergency landing at Rome's Fiumicino airport on Sunday night after landing gear failed to function, Italy's state-run ANSA news agency reported.
The pilots made several attempts to land the aircraft, an Airbus A320, which was flying to the Italian capital from Madrid. A foam path was used to assist with the landing.
The plane did not skid off the runway and none of the 151 passengers on board were injured.
A picture taken by Instagram user Andrea Ugolini showed the aircraft tilted to one side while passengers were evacuated using the emergency exit above the wing.
ANSA said that passengers clapped and congratulated the pilot, who had more than 15,000 hours of flying experience and had previously worked in the military.
Two investigators have been sent to the scene to determine the cause of the equipment failure.
Journalists Sophie Brown and Katie Hunt in Hong Kong contributed reporting