A Chinese pilot has been banned from flying for life after he allowed a passenger into the cockpit, violating air safety regulations.

3 QANTAS CREW MEMBERS INJURED DURING SUDDEN TURBULENCE

The Air Guilin pilot, whose name was not shared, took a photo showing a female passenger posing in the cockpit next to cups that had been laid out. The airline did not confirm whether the photo was taken during the flight, but analysts reportedly suggest that it was.

The photo was taken Jan. 4 on a flight from Guilin to Yangzhou, BBC reported, although it did not go viral until this week. The airline reportedly was not aware of the photo until screenshots were shared widely on popular Chinese social media site Weibo over the weekend.

It is not known why the pilot let the woman into the cockpit, but his actions violated regulations “by allow[ing] irrelevant personnel" into the secure area, Air Guilin said in a statement.

It is not known why the pilot let the woman into the cockpit, but his actions violated regulations “by allow[ing] irrelevant personnel" into the secure area, Air Guilin said in a statement. (Weibo)

CLICK HERE TO GET THE FOX NEWS APP

The woman, who was also not named, is rumored to be a flight attendant in training at a university in Guilin, Chinese News Service reports.

It is not known why the pilot let the woman into the cockpit, but his actions violated regulations “by allow[ing] irrelevant personnel" into the secure area, Air Guilin said in a statement to the BBC.

"Passengers' safety is always Air Guilin's priority. We take a zero-tolerance approach against any inappropriate and unprofessional behavior that might risk aviation safety," the Chinese carrier said.

CLICK HERE TO SIGN UP FOR OUR LIFESTYLE NEWSLETTER

Other staff members on the flight at the time were reportedly “suspended indefinitely” while the airline investigates the incident.