Oxygen masks are an integral safety feature on airplanes. If a plane’s cabin experiences a sudden drop in air pressure during flight — from, say, a cracked window — the oxygen flowing from the masks could be the only thing saving passengers from brain damage or death.

Now, John Barnett, a former quality control engineer for Boeing, has told BBC News that 25 percent of the oxygen systems he tested in 2016 for the company’s iconic 787 Dreamliner jets didn’t work correctly — and Boeing went ahead and installed them on planes anyways.

Boeing employed Barnett for 32 years, the last seven of which he spent working as a quality manager at the company’s factory in North Charleston, South Carolina.

Barnett told BBC News he was decommissioning some cosmetically damaged emergency oxygen systems for the company’s 787 Dreamliner jet in 2016 when he noticed some of the bottles containing the potentially life-saving oxygen weren’t discharging properly.

Barnett said he arranged for Boeing’s research and development unit to conduct a test of 300 undamaged, “straight out of stock” oxygen systems — and 75 of the systems didn’t deploy properly.

Barnett claims Boeing managers thwarted his attempts to have the matter investigated. When he then tried to go over Boeing’s head and report the problem to the Federal Aviation Administration, it told him Boeing “had indicated it was working on the issue.”

Boeing, meanwhile, told BBC News that, while it did discover improperly deploying oxygen bottles in 2017, it disputes Barnett’s version of the events that followed.

“We removed those bottles from production so that no defective bottles were placed on airplanes,” the company said, “and we addressed the matter with our supplier.”

Further complicating the situation is the fact that 2017 also happens to be the year Barnett retired — a development which the company described to BBC News as planned and voluntary.

However, Barnett claims he was forced into retirement because Boeing’s attempts at “denigrating his character and hampering his career because of the issues he pointed out” left him with no other options.

Barnett’s now suing Boeing for that alleged retaliation, and while it’s too soon to predict how that’ll play out in court, his allegation that Boeing’s aircraft aren’t as safe as the company claims does have precedent.

In October, Boeing admitted that some of its 737 NG airliners had cracks in their bodies, forcing airlines to ground dozens of the jets. In March, Boeing grounded its entire fleet of 737 MAX commercial airliner jets following two deadly crashes in the previous six months — and Barnett believes a 787 could soon be involved in a horrific incident of its own.

“Based on my years of experience and past history of plane accidents, I believe it’s just a matter of time before something big happens with a 787,” he told BBC News. “I pray that I am wrong.”

READ MORE: Boeing whistleblower raises doubts over 787 oxygen system [BBC News]

More on Boeing: Dozens of Boeing 737 Jets Grounded Because of “Cracks”