Hundreds of passengers aboard a Milan-bound red-eye flight got the scare of their lives Monday when the jet turned back due to engine problems and then burst into flames on the runway in Singapore.

All 241 passengers and crew survived the harrowing ordeal aboard the Singapore Airlines Boeing 777, but not without heart-stopping drama in the air and on the tarmac at Changi Airport, where the ill-fated flight began and ended. Firefighters doused the flames even as passengers waited inside the cabin and the smell of jet fuel hung in the air, a witness said.

"We were so close to death!! I am still in the plane with all passengers. But I think we are safe for now..." passenger Lee Bee Yee posted on Facebook.

Yee told a local media outlet that the smell of fuel entered the cabin.

'We were informed by the pilot that there was a leak, and that the plane would have to return to Changi Airport as it did not have enough fuel for the journey,' she told The Straights Times.

"The blaze was quite fierce and we waited for around two to three minutes before the fire engines arrived," she said.

The airline said Monday Flight SQ368 turned back "following an engine oil warning message." It said the aircraft's right engine caught fire after Flight SQ368 touched down more than four hours after takeoff.

"The fire was put out by airport emergency services and there were no injuries to the 222 passengers and 19 crew on board," it said.

Singapore Transport Minister Khaw Boon Wan said in a Facebook post that he was “relieved” to learn the plane landed safely at Changi Airport.

"Incident is being investigated, as to the cause and whether any of our procedures can be improved further. Fortunately, all crew and passengers are safe," he said.

Passengers were transferred to another aircraft that was to depart for Milan later Monday. Singapore Airlines pledged to cooperate with authorities conducting an investigation.

The only accident a Singapore Airlines jet has suffered came in Oct. 31, 2000 when a jet bound from Taiwan to Los Angeles crashed into construction equipment at the Taiwan Taoyuan International Airport attempting to take off from the wrong runway. The crash left 83 dead.

The Associated Press contributed to this report