A trainee pilot on his first flying lesson has been commended for safely landing a plane after his instructor suffered a medical emergency and collapsed mid-air.

Max Sylvester was on a flying lesson south of Perth on Saturday when his instructor collapsed.

It is understood the instructor was drifting in and out of consciousness, forcing the student to take control of the Cessna and safely land it at Jandakot Airport while being coached by air traffic control.

A trainee Perth pilot has safely landed a plane after his instructor reportedly collapsed mid-air. Source: 9 News More

‘You’re doing a really great job’

In an intense audio recording, control tower personnel can be heard guiding the student and telling him, “You’re doing a really great job”, as he made several practice passes at the runway.

After a few trail runs, where the trainee was instructed several times to “lift your nose up”, he was eventually told he was ready to land on the next pass.

“Looking great mate, this is perfect. Keep it up,” a man from air traffic control reassured the student as he touched down on the runway.

“You did it mate, well done. You’ve done so well ... You’ve done an absolutely amazing job. Well done.”

At least 10 emergency vehicles were seen waiting on the tarmac for plane to land, including fire crews and paramedics.

Emergency crews applauded and cheered, along with Mr Sylvester’s wife and three young children who were anxiously waiting at the ground, when the student made his first solo landing.

The instructor and student were reportedly treated by emergency crews at the scene. The instructor was taken to hospital in a stable condition about 5pm.

Chuck McElwee, who owns and operates the Perth flying school, said he'd never had an incident like this in his 28 years in business.

"This good outcome is what you hope for. It just worked out this time," he said.

Mr McElwee praised the young pilot, tower controller and the back-up instructor who all "did an exceptional job", and worked "incredibly well" to get everyone safely on the ground.

with AAP

Do you have a story tip? Email: newsroomau@yahoonews.com.

You can also follow us on Facebook, download the Yahoo News app from iTunes or Google Play and stay up to date with the latest news with Yahoo’s daily newsletter. Sign up here.