3M Co. has agreed to pay $6 billion to resolve hundreds of thousands of lawsuits alleging it sold defective earplugs to the U.S. military that led to hearing damage for combat troops.

The company will pay $5 billion in cash and $1 billion in 3M common stock under the terms of the agreement, it said in a statement on Tuesday. It said it would record a third-quarter pretax charge of about $4.2 billion, on top of the $1.1 billion it has already allocated for the claims. 3M isn’t admitting any "fault or liability” as part of the settlement, according to court filings.

The settlement, in one of the largest multi-district litigation cases in U.S. history, resolves a major source of uncertainty for 3M investors. They have watched the company’s market value decline by more than half since 2019 amid legal liability from the earplug claims and 3M’s legacy of producing "forever chemicals.” In June 3M agreed to pay as much as $12.5 billion to settle claims by drinking-water utilities over the substances.