Boeing has agreed to plead guilty to a criminal fraud charge linked to the tragic 737 Max crashes, the Justice Department announced Sunday. This comes months after U.S. prosecutors accused the aerospace giant of violating a 2021 settlement that had previously shielded it from criminal prosecution.

As part of the settlement, Boeing will pay a $243.6 million fine and appoint an independent compliance monitor for a three-year probationary period. Boeing also is required to invest at least $455 million in compliance and safety programs, according to a U.S. Attorney’s Court filing Sunday night. The settlement agreement awaits approval from a federal judge to go into effect.

The agreement also calls for Boeing’s board of directors to meet with the families of the crash victims.

Boeing faced a difficult decision: accept a guilty plea with conditions or go to trial, all while trying to recover from production and safety crises, appoint a new CEO and acquire its fuselage supplier, Spirit AeroSystems.

A guilty plea would label Boeing a criminal entity, potentially complicating its ability to do business with the U.S. government, which accounted for about 32 percent of Boeing’s nearly $78 billion in revenue last year through its defense, space and security unit.

«We can confirm that we have reached agreement in principle on the terms of a resolution with the Department of Justice, subject to the formalization and approval of specific terms,» ​​Boeing said.

In May, the Justice Department said Boeing had violated the 2021 settlement. Under the deferred prosecution agreement, Boeing had agreed to pay $2.5 billion, which included the original $243.6 million criminal fine, compensation to airlines, and a $500 million fund for victims’ families.

The 2021 agreement was set to expire just two days after a door panel incident involving a nearly new 737 Max 9 operated by Alaska Airlines on Jan. 5. Although there were no serious injuries, the incident created another safety crisis for Boeing.

The United States has charged Boeing with conspiracy to defraud the government by misleading regulators about the flight control system of the 737 Max, which was implicated in two crashes: a Lion Air flight in October 2018 and an Ethiopian Airlines flight in March 2019, which killed 346 people.

On June 30, U.S. prosecutors informed the victims’ families of their intention to ask Boeing to plead guilty, a plan that the families’ lawyers criticized as a «bargain.»

Paul Cassell, an attorney for the victims’ families, said he plans to ask a federal judge to throw out the settlement and proceed with a public trial to ensure all the facts are revealed in an open and impartial forum before a jury.