Boeing will pay $2.5 billion to settle its alleged concealment of information about problems with its 737 Max jets.

Boeing chief executive Dave Calhoun said the settlement was the right thing to do for the company. He said the company acknowledged it had fallen short of its values and expectations.

Federal prosecutors said the settlement would close the Justice Department's two-year investigation into the company's 737 Max's shortcomings. The Justice Department will drop all charges against the company after three years on the condition that it doesn't commit any further violations.

The Justice Department accused Boeing of having been aware of its jets' technical issues - two of which crashed killing 346 passengers and crew.

In its initial investigation, the Justice Department said that Boeing had "knowingly and willfully" conspired to conceal information and defraud the U.S. In doing so, the company had undermined the Federal Aviation Administration's mandate to ensure the public's safety.

Boeing previously admitted that technical pilots had "deceived" the Federal Aviation Administration about the performance and reliability of its flight control systems - the alleged cause of the two crashes.

"Boeing's employees chose the path of profit over candor by concealing material information from the Federal Aviation Administration concerning the operation of its 737 Max airplane and engaging in an effort to cover up their deception," acting assistant attorney general David P. Burns of the Justice Department's Criminal Division said.

The $2.5 billion that Boeing has agreed to pay includes a $243.6 million criminal penalty, $500 million going to a fund for the crash victims' families and $1.77 billion to compensate its airline customers.

Boeing said in the settlement that it fully admits to the wrongdoing. The company has agreed to waive its rights to a trial under the settlement. The company said that the admission of wrongdoing does not implicate its top executive and its wrongdoing was not pervasive.