Two telecom firms, TalkTalk and Tiscali, have been threatened with fines for billing customers for services that had been cancelled.
The regulator Ofcom has received more than 1,000 complaints this year and says more customers may be affected.
The customers had typically complained about aggressive demands for the payment of bills they did not owe.
TalkTalk blamed a new billing system introduced after it bought Tiscali in June last year.
This is gradually bringing together a million former Tiscali customers on seven different billing systems and integrating them with TalkTalk's own customer database.
The regulator warned that "many thousands more" may have been wrongly charged.
But TalkTalk said no more errors of this sort were likely to be made, as the billing system had now been fixed to stop it generating any more spurious bills for customers who had left.
"TalkTalk Group has co-operated fully with Ofcom's investigation and we apologise for the inconvenience caused to this limited group of former customers," the company said.
Ofcom has told TalkTalk to stop trying to collect any non-existent debts, including the use of debt collectors and threats of legal action.
People must be refunded if, since 1 January 2010, they have paid bills that should not have been levied.
And credit ratings agencies must be told to repair any damaged credit histories.
If the company fails to comply by 2 December it may be fined as much as 10% of its annual turnover.
"Ofcom is determined to stand up for consumers and take action against companies that break the rules," said Ofcom's director of consumer affairs, Claudio Pollack.
"Our investigation into TalkTalk and Tiscali UK found that they had billed customers for cancelled services; this is unacceptable which is why we have ordered them to clean up their act or face the consequences."
Slow to act
Mr Pollack said the problems were still going on and TalkTalk had been slow to do anything about them.
"It's been five months now since we drew TalkTalk's attention to this, it's been three months since we opened an investigation," he told the BBC.
"There are still complaints about customers receiving bills for services that were not delivered and there are even complaints about customers who have been referred to debt collection agencies," he added.
Robert Hammond at Consumer Focus said: "It is shocking that it has taken the intervention of the regulator for Talk Talk and Tiscali UK to play fair with their customers."
Ernest Doku at the price comparison website Uswitch said: "Anyone affected by this issue should first try to resolve it with their provider, but if they are not getting anywhere should go directly to one of the accredited dispute resolution bodies such as Otelo or CISAS."