When a diabetic passenger was suffering from dangerously high blood sugar, the flight crew was preparing to make an emergency landing – but thanks to a resourceful engineering student who happened to be on board, they didn’t have to.

Back in February, electrical engineering student Karttikeya Mangalam had just finished an exchange program in Geneva and was on his way home to New Delhi via a connecting flight from Moscow.

As he was on the plane, however, a man who was sitting two rows behind him started having a medical emergency.

21-year-old Mangalam recently wrote about the harrowing incident in his university’s in-house magazine.

LOOK13 Truckers Use Their Vehicles to Prevent Suicide Attempt From Ending a Life

The passenger, a 30-year-old Dutch man named Thomas, suffered from type 1 diabetes and he had forgotten his insulin pump at the Moscow security desk. Since it had been five hours since his last insulin dose, his blood sugar levels were quickly rising.

Fortunately, there was a doctor on board who also happened to have diabetes. Upon hearing that a man was in trouble, he rushed over to help.

“The doctor tried to calm him down and explained to the hostess that he needed urgent insulin or he would pass out with possible multiple organ failures and coma or worse,” recalls Mangalam. “I personally think it created more panic than helping the situation.

“Anyway, Thomas already had some cartridges of short-term fast working insulin with him, all he needed was a method to inject them.”

RELATEDNASA Engineer Saves Passenger Jet From Disaster When He Spots Malfunction From Window Seat

Though the doctor also had diabetes, he used a pen-like contraption to inject the treatments, rather than a pump, which meant that Thomas’s cartridges could not work properly with the device.

As precious time passed and the passengers deliberated on Thomas’s situation, the Dutch man collapsed and the flight crew announced that they would be making an emergency landing.

Instead of waiting an hour and a half for the plane to touch down, Mangalam used the plane’s Wifi to look up diagrams of the injector. He compared the device to the blueprints until he noticed a key detail in the design drawings: there was a spring missing from the doctor’s injector.

MOREDoctors on a Plane Save Woman’s Life by Constructing Makeshift Ventilator Out of Nearby Parts

All while “keeping a cool head,” the young student told the flight attendant to ask if any of the passengers had ball point pens. Several people handed over the writing utensils and Mangalam started taking them apart so he could use their springs.

He finally found a spring that fit perfectly into the insulin injector. Mangalam reassembled the device and handed it back to the doctor who treated Thomas and told the flight attendant that an emergency landing was no longer necessary because the Dutch man’s blood sugar was quickly returning to normal.

After they landed, Mangalam escorted Thomas to the hospital, as the Dutch man was traveling alone and he had never been to India before.

WATCHWhen Man Suddenly Collapses, People Line Up For 96-Minute CPR Marathon to Save Him

“On the stretcher in the ambulance, he thanked me a lot and told me to come visit him in Amsterdam where he owns his own restaurant and brewery and where I supposedly would receive as much free food and beer as I want when I come to visit!” says Mangalam.

The 21-year-old credits his life-saving efforts to a first-year engineering class that he “loathed” as a new student.

“This incident has made me realize the importance of the basic engineering skills we are taught in our freshman year,” he says. “I think saving a man’s life is more than what anyone could ever imagine to achieve from [those basic studies].”

Be Sure To Share The Incredible Story With Your FriendsPhoto by Karttikeya Mangalam