The NHS has been given an £8m payout from a pharmaceutical firm after an investigation found that it engaged in anti-competitive practices that pushed up the cost of a life-saving drug for the health service.

It is the first time that the Competition and Markets Authority has secured such a payment to the NHS as part of one of its investigations.

Aspen, which is also facing a fine of up to £2.1m, supplies the NHS with fludrocortisone, a life-saving medicine mainly used to treat Addison’s disease. It is paid for by the NHS.

“The CMA launched this investigation because we consider it unacceptable for the NHS – and the taxpayers who fund it - to have to pay millions of pounds more than they should for this life-saving drug,” said Andrea Coscelli, the chief executive of the CMA.

The CMA’s investigation found that Aspen struck deals to pay two rival companies to stay out of the market for the drug, making Aspen the sole supplier and able to set prices without facing competition.

During the CMA’s investigation Aspen made an approach to the regulator in an effort to resolve the case. The company has admitted that it was part of an illegal, anti-competitive deal and agreed to make the £8m payment, which means the government will not have to launch a court action for damages.

“The £8m Aspen has agreed to provide will save the NHS the time and expense of seeking damages in court,” said Coscelli. “Importantly, Aspen has also committed to ensuring there are more competitors in this market, giving the NHS the opportunity to secure better value for UK taxpayers’ money in the future.”

The CMA said it is continuing its investigation into the two other unnamed pharmaceutical companies involved in the anti-competitive deal.

Fludrocortisone is a life-saving medicine on which thousands of patients depend. It is supplied only on prescription, mainly to treat primary or secondary adrenal insufficiency, commonly known as Addison’s disease. It is paid for by the NHS and so ultimately by UK taxpayers.

The CMA’s ruling saw shares in the South African headquartered Aspen, which has been listed on the Johannesburg Stock Exchange for two decades, fall by more than 6% in early trading on Wednesday.

“The commitments offered by Aspen and the settlement discussions being undertaken between the CMA and Aspen reflect the group’s willingness to address the concerns raised by competition authorities into alleged anti-competitive conduct by Aspen,” the company said in a stock market statement.

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