Energy giant British Gas has been fined £2.5 million by the energy watchdog for failing to deal with complaints correctly.
British Gas, which serves nearly half of the UK's households, failed to re-open cases when customers indicated their complaint had not been resolved, Ofgem found.
The regulator also said the company failed to provide key information about the energy ombudsman to customers when complaints were not resolved and put in place a process to deal with businesses with 10 employees or fewer.
Ofgem said British Gas breached regulations setting standards for complaint handling which came into effect in October 2008.
Sarah Harrison, Ofgem's senior partner for sustainable development, said: "Today's finding highlights basic failures in British Gas's customer service, particularly in dealing with some of its small business customers, and shows Ofgem's commitment to use its powers to ensure suppliers treat customers fairly and transparently.
"We warned the industry in March that we would be backing up our plans to reform the retail market with a tough approach to enforcement."
British Gas said Ofgem's finding was "totally disproportionate" but did admit it failed on the issue of dealing with so-called micro businesses.
A British Gas spokesman said: "Specifically for our micro-business customers, we acknowledge our service fell short of what they should expect from British Gas, for which we apologise.
"We knew we had an issue here which is why we flagged it to Ofgem. After a £4 million investment, we are now confident we meet all of our regulatory requirements."
Ofgem has vowed to get tough with energy firms as part of a proposed shake-up of the industry.
The regulator's reforms include reducing the number of tariffs suppliers offer to avoid confusion over price and improving transparency by appointing an independent accounting firm to ensure the suppliers' books are clear.
Ofgem is investigating Npower and EDF Energy for complaint handling, while Scottish Power, Scottish and Southern Energy, EDF Energy and Npower are being investigated for mis-selling.
The watchdog is also running two investigations into Scottish Power for potentially misleading marketing and the difference between its standard credit and direct debit tariffs.
British Gas, which is owned by energy giant Centrica, earlier this month announced price hikes of up to 24%.
Nine million customers will be hit when the supplier raises gas and electricity prices by an average of 18% and 16% respectively from August 18.
Audrey Gallacher, director of energy at Consumer Focus, welcomed Ofgem's action against British Gas.
She said: "Frustrating the attempts of customers to get complaints sorted out is unacceptable. It adds to the lack of trust in energy companies and it denies British Gas important insight into customer service problems.
"The importance a company gives to solving customer complaints is a good indication of how much they value their customers.
"British Gas deserve some credit for being open about its failures and taking action to put them right. But the experience of its customers when they make a complaint in the future will be the real test."
Shadow energy secretary Meg Hillier said the fine would deliver "a further knock to public trust" in the UK's "big six" energy providers, who together supply 99% of customers.
Ms Hillier said: "So-called customer choice in the energy market is limited to whether to switch between a confusing array of energy tariffs set by companies, who are all increasing their prices unfairly and disproportionately.
"David Cameron promised he would take action to prevent excessive price rises - he is breaking that promise.
"We need greater competition in the market. That is why Labour is calling on the Government to force the energy companies to pool the power they generate and make it available to any retailer. This would help drive down prices."