Npower will pay a record settlement of £26 million for failing to deal with complaints correctly after sending out inaccurate bills.

Energy regulator Ofgem said it had ordered Npower to pay the settlement for "for failing to treat customers fairly". The error affected around 500,000 customers between September 2013 and December 2014. Between those dates, Npower received more than two millions complaints

The £26m will be split between the customers worst affected and charities, Ofgem said. It is the single largest settlement Ofgem has agreed with one of the 'big six' energy firms.

Ofgem said: "Npower often failed to resolve these issues promptly, pursued debts which were in dispute and failed to keep its own commitments to customers on billing. This caused significant distress and worry for many."

The regulators investigation found that Npower's IT system, which was introduced in 2011, was to blame for the incorrect bills being issued.

Dermot Nolan, Ofgem chief executive, said: "Npower failed its customers. Not only have its billing and complaint handling procedures been chaotic, it treated many of its customers poorly, which is completely unacceptable.

"Npower's management failed to act quickly enough to protect its customers when things went wrong with changes to its IT system."

Simon Stacey, managing director of domestic markets for Npower, said: "The last few years, since we changed the systems that support our domestic business, have been very disappointing for our customers - and for Npower.

"We are very sorry about what has happened and that is why we have agreed this significant package of customer redress."