A company that supplied faulty parts to NASA, which caused rocket launch failures in 2009 and 2011, pleaded guilty to fraud, the agency said in a statement on Tuesday.

Sapa Profiles, Inc. (SPI), an aluminum manufacturer based in Oregon, will pay $46 million to NASA and other affected customers, according to court documents released on April 23 by the US Department of Justice (DOJ). The company ran a 19-year criminal scheme that defrauded NASA, the Department of Defense, and other entities.

“For nearly two decades, SPI and its employees covered up substandard manufacturing processes by brazenly falsifying test results,” said US Attorney G. Zachary Terwilliger for the Eastern District of Virginia in a DOJ statement. “They then provided the false test results to hundreds of customers across the country, all to increase corporate profits and obtain production-based bonuses.”

SPI supplied aluminum joints for the Taurus XL rocket (since rebranded the Minotaur-C). The parts connect two halves of the fairing, which is the conical structure at the top of the rocket that protects the payload—the object being sent to space—from the high pressures and heat of a launch. The joints are supposed to fracture during the launch sequence so the full fairing can be jettisoned, which frees the payload to be deployed into orbit.

In 2009, a Taurus XL rocket carrying NASA’s Orbiting Carbon Observatory (OCO) failed to reach orbit because the fairing did not separate causing the vehicle to lose velocity and fall back to Earth. Two years later, the same problem destroyed NASA’s Glory scientific satellite, also launched onboard a Taurus XL vehicle. The combined cost of the two satellites exceeded $700 million.

During its investigation of the Taurus XL failures, NASA’s Launch Services Program (LSP) isolated the malfunction to the aluminum joint materials that had failed to break. Independent testing of the parts by LSP revealed that SPI had falsified certifications and test results about its product.

LSP passed the findings on for further investigation by NASA’s Office of the Inspector General (OIG) and the DOJ. These organizations uncovered evidence that SPI employees falsified at least 4,100 documents between 1996 and 2015. Test results revealing that aluminum parts failed to meet tensile strength requirements were altered to make it appear as if they had passed certification.

Dennis Balius, the SPI testing lab supervisor who led the scheme, pleaded guilty to mail fraud and was sentenced to three years in prison.

While $46 million will not recoup the $700 million and scientific potential lost to the failures, NASA hopes the charges will be a deterrent to similar criminal behavior from suppliers.

“Due in large part to the hard work and dedication of many highly motivated people in the NASA Launch Services program, we are able to close out the cause of two extremely disappointing launch vehicle failures and protect the government aerospace supply chain,” Amanda Mitskevich, LSP program manager at NASA’s Kennedy Space Center, said in a statement.

“It has taken a long time to get here, involving years of investigation and testing, but as of today, it has been worth every minute, and I am extremely pleased with the entire team’s efforts.”