Energy company E.ON has been forced to hand over £1.7m to customers after it was caught overcharging.
The company penalised around 94,000 customers who were incorrectly charged exit fees or overcharged following price rises.
The compensation amount agreed with energy regulator Ofgem includes a £300,000 payment to a consumer fund which E.ON runs in partnership with the charity Age UK.
Sarah Harrison, Ofgem's enforcement chief said: "Ofgem has put in place protections for consumers so they can get a fair warning if their supplier puts up prices and time to shop around for a better deal. E.ON has accepted it failed to meet these protections. Today's announcement that E.ON will compensate customers is a positive step by the company to put right their mistakes."
She reported that E.ON has assured Ofgem that all of the consumers affected have now been identified and will be contacted and sent a rebate of an average of £14.83. This includes 8 per cent interest on the amount they were incorrectly charged.
Audrey Gallacher, director of energy at the watchdog Consumer Focus said the compensation payment sends a timely warning to the energy industry that firms must stick to the rules.
"Customers need guarantees that energy suppliers play fair on penalty fees and price rises - particularly given the high level of consumer distrust of the energy market," Ms Gallacher said.
"We want to see new powers for Ofgem to require fines to be paid back to energy customers brought into force as soon as possible, to ensure people can be directly compensated if they lose out when things go wrong."
The watchdog also warned consumers on fixed-term deals that they don't have to pay a termination fee if their supplier raises prices, as long as they tell their supplier they want to switch within fifteen working days of being written to about the increase.