When a medical emergency arose during a China Eastern Airlines flight, the pilot had to make a quick decision to expel 30 tons of fuel from the plane. While this tactic may seem dangerous, he actually did it for a very good reason.

During the flight from Shanghai, China to New York City on March 23, a 60-year-old woman in economy class, who wanted to be known as Ivy, began to have trouble breathing and was slipping in and out of consciousness, according to The Straits Times.

The woman, who was traveling with her daughter at the time, was moved to business class by the flight crew in order to get better medical assistance.

At that point in the flight, the plane was close to Ted Stevens Anchorage International Airport in Alaska, but in order for the pilot, Gu Jian, to land, he knew he would need to have the correct landing weight — which meant dumping several tons of fuel.

"The airplane's weight was 282 tons, far more than the maximum landing weight. When the sick passenger needed medical attention for safety reasons, the plane had to descend and dump gasoline at the same time,” Jian told CGTN.

Since the flight crew had already made three announcements searching for a medical professional on board, yielding no volunteers, the pilot proceeded to dump the plane’s fuel and made an emergency landing at Ted Stevens International Airport after about seven hours in the air.

Ivy was taken to a local hospital to be treated for her symptoms. According to The Straits Times, she and her daughter were able to catch a flight to New York the next day.

Other passengers on the China Eastern Airlines flight were able to remain on board while the plane refueled. The flight then took off again after a six-hour delay.