AUSTRALIA (CBSNewYork) – Imagine you’re learning how to fly a plane and you’re suddenly left alone in the middle of sky without knowing how to land.

That nightmare actually played out in Australia after a flight instructor passed out mid-lesson.

Luckily for one brave student, who got the lesson of a lifetime, this story has a happy ending.

Max Sylvester’s training plane after safely landing in Australia. (Credit: CBS2)

Max Sylvester, the pilot-in-training, was only in his third lesson when his instructor had a medical emergency in the air.

Sylvester had never flown a two-seat Cessna, nor had he landed a plane before.

With help from air traffic controllers, he made several passes over the runway but eventually was able to make a perfect landing.

“Adrenaline and my knowledge of flying that I love, that’s really all that kept us going,” Sylvester said once he was safely back on the ground.

The flight instructor is reportedly in serious but stable condition. It’s believed he had a seizure.