PARIS — Airbus will pay $4 billion in fines to settle a lengthy global corruption investigation, a French court announced Friday, removing a legal cloud over the world’s largest plane maker as it seeks to keep ahead of its rival Boeing after the grounding of Boeing’s 737 Max plane.

The settlement with the authorities in France, Britain and the United States closes four years of investigations into accusations that Airbus, between 2004 and 2016, used intermediaries to bribe public officials in numerous countries to buy its planes and satellites. The episode had tarnished the company’s reputation and forced it to make sweeping changes to top management.

It also allows Airbus to avoid criminal charges that, if proved, could have crippled its business by prohibiting the company from seeking public contracts in Europe and the United States. Airbus will be subject to three years of “light compliance monitoring” in France, the nation’s anticorruption agency said Friday.

“In reaching this agreement today, we are helping Airbus turn the page,” said the French prosecutor, Jean-Francois Bohnert. The company “can now serenely look to its economic future.”