Reckitt Benckiser has agreed to pay a $1.4bn (£1.1bn) fine to settle a US investigation into sales of a treatment for addiction to opioids by its former prescription drugs business Indivior.

The maker of Nurofen and Durex said it had reached a deal with the US Department of Justice and Federal Trade Commission to resolve the long-running inquiry into sales and marketing of Suboxone Film, an opioid-based drug.

Reckitt said it had acted lawfully at all times but agreed to settle to draw a line under the investigations and avoid further costs and uncertainty. Paying the fine, the highest single penalty so far imposed on a company involved in the US opioids crisis, also protects the company’s participation in US government programmes, Reckitt said.

“After careful consideration, the board … determined that the agreement is in the best interests of the company and its shareholders. It avoids the costs, uncertainty and distraction associated with continued investigations, litigation and the potential for an indictment,” the FTSE 100 company said.

In April, the US justice department charged Indivior with fraudulently claiming Suboxone Film was better and safer than similar drugs when it was not. The company, owned by Reckitt until 2014, also referred patients to doctors it knew to be prescribing opioids in a careless manner, the indictment said.

The indictment demanded the forfeiture of at least $3bn in cash, as well as all Indivior’s main business divisions, bank accounts, trademarks and patents – effectively meaning the company would cease to exist if found guilty. Though Reckitt was not charged, investors worried the company could face a big fine or an indictment.

Reckitt shares rose 2.4% to £65.82 as investors decided the company was correct to pay the fine to bring an end to the matter.

Morgan Stanley analysts said the settlement was a “clear positive resolution” to the investigation. “The DoJ investigation has been a long-term overhang on the stock,” they said. “Importantly, the resolution will protect RB’s participation in all US government programmes.”

Shares of Indivior jumped 27% to 56.43p on speculation that Reckitt had covered almost half the $3bn demanded by the justice department and that the US might be willing to settle with Indivior.

Indivior, which has set aside $438m to cover potential costs, said its case with the justice department was separate from Reckitt’s and that it had no new information. Indivior has previously said it had strong defences against the charges and would defend itself vigorously.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

The increase in addiction to opioids has prompted intense scrutiny of drug companies. The US president, Donald Trump, declared the opioids crisis, which has killed 200,000 Americans in the past two decades, a public health emergency in 2017.

Reckitt said it would fund the fine from existing borrowing facilities and cash generation. It has already set aside $400m to cover penalties related to Indivior and will increase that provision to $1.5bn to cover the fine and any further litigation.

The company is going through an upheaval after a period marred by a cyber-attack, factory disruption and a £300m payout to relatives of people who had illness and fatal lung injuries linked to humidifier sterilisers sold by Reckitt in South Korea. Reckitt’s chief executive, Rakesh Kapoor, is leaving later this year and the company is splitting its health business from hygiene and household products.

Separately, Indivior published a trading update increasing its guidance for revenue and profit this year based on better-than-expected sales of Suboxone Film against a generic rival. The statement did not mention the investigation.