Air China Flight CA106 lost more than 20,000 feet of altitude within a matter of minutes on Tuesday.

According to Chinese aviation regulators, the loss of altitude was caused by an emergency descent resulting from insufficient oxygen in the cabin.

Investigators say the low oxygen levels were caused by one of the pilots who accidentally turned off the plane's air conditioning to hid the fact that he'd been smoking an e-cigarette.

A vaping pilot on board an Air China Boeing 737 is believed to have caused his plane to make an emergency descent in search of breathable air on Tuesday.

The BBC, citing Chinese investigators, reported that the first officer of Air China Flight CA106 accidentally shut off the plane's air conditioning system — causing insufficient oxygen levels in the cabin.

Flight CA106 took off from Hong Kong Tuesday evening at 7:10 pm local time bound for the city of Dalian in northeastern China. Data from flight-tracking website FlightAware.com shows the Air China jet heading northeast at 35,000 feet when it began to descend at around 7:39 pm.

Within a matter of 18 minutes, the plane was down to just 12,300 feet.

An investigation into the incident by the Civil Aviation Administration of China discovered that the first officer was trying to hide the fact that he had been smoking an e-cigarette in the cockpit from the flight's captain, the BBC reported.

Instead of turning off a fan to prevent the vapors from reaching the passenger cabin, he turned off the passengers' air conditioning.

In reaction to an alarm triggered by the air conditioning shut off, the flight crew dropped the plane's emergency oxygen masks and initiated a descent to a lower altitude with breathable air.

The crew returned to normal cruising altitude once it was discovered that the air conditioning was, in fact, turned off.

The flight landed safely in Dalian at 10:29 pm.

According to the Telegraph, Air China said it has a "zero tolerance" policy for such behavior.

The use of e-cigarettes in the cockpit is not allowed under Chinese aviation regulations.

The investigation into Flight CA106 is ongoing. It's unclear what type of punishment the offending pilot will face.