Energy giant British Gas has paid out £2.65 million after regulator Ofgem found it overcharged more than 94,000 customers switching provider and wrongly imposing exit fees on thousands of households.
The energy watchdog said Centrica-owned British Gasincorrectly charged 94,211 customers its more expensive standard variable rate tariff after they decided to switch to a new supplier, due to a system error.
These customers were overcharged by £782,450, according to Ofgem.
It also said British Gas wrongly informed 2.5 million customers that exit fees were chargeable during the 49-day switching window and incorrectly charged exit fees totalling £64,968 to 1,698 fixed-deal customers.
Ofgem, which opened its investigation in July last year, said before it had concluded its probe British Gas refunded all customers overcharged by more than £1 and paid out £502,633 in compensation to them.
The provider has also agreed to pay a further £244,770 in compensation to customers wrongly charged exit fees and the standard variable tariff and pay £1.1 million into Ofgem's consumer redress fund.
Anthony Pygram, director of conduct and enforcement at Ofgem, said: "British Gas failed its customers who were coming to the end of their fixed contracts and switched supplier by unfairly penalising them and applying charges in error.
"Many more customers could have been deterred from getting a better deal due to the incorrect terms and conditions."
He added: "Our enforcement action against British Gas sends a strong message to all suppliers that they must respect their customers' rights during the switching window and always treat customers fairly."
Ofgem said the system error at British Gas that led to customers being rolled on to more expensive rates also saw 18,095 customers who decided to switch being wrongly charged at a cheaper rate.
British Gas has since corrected its terms and conditions for customers to make clear they would not be charged exit fees during the switching window and changed its procedure for providing this information.
It also agreed to appoint an external auditor to review the relevant policies and procedures and has committed to implement its "reasonable" recommendations.
A Centrica spokesman said: "A system error led to a small proportion of customers being incorrectly charged. We've apologised to the customers affected.
"Those who were charged too much were promptly refunded as soon as we identified the issue and were paid an additional goodwill gesture.
"Some customers were provided with initial communications containing incorrect terms and conditions - but all other communications they received were correct."
Ofgem said that under licence conditions, energy customers are generally entitled to switch at any time during or after the so-called switching window without having to pay an exit fee.
The switching window is designed to encourage customers to switch to a better deal before they are rolled onto a default tariff at the end of their contract.
British Gas recently announced it was raising the cost of its standard variable tariff by 3.8% on October 1, impacting 3.5 million customers.