All new claims against banks were effectively suspended in July 2007 when the OFT and the banks agreed to stage the test case to see if the overdraft charges were legal or not.
The OFT has previously said that even if it lost, it would still try to use other powers, perhaps by instigating a full Competition Commission enquiry, to attack overdraft fees.
In explaining his ruling, the Supreme Court's president Lord Phillips said that bank customers agreed to pay overdraft charges as part of the price of having a current account, so they fell outside the scope of the 1999 consumer contract regulations.
But Lord Phillips added that this was not the end of the matter as the OFT could still try to scrutinise bank charges under other parts of the regulations.
"This will not close the door on the OFT's investigations and may well not resolve the myriad cases that are currently stayed [put on hold] in which customers have challenged the relevant charges," he told the court.
The judge did not give any explicit guidance as to how the judicial authorities should deal with the frozen cases.
Later the Judicial Communications Office said that each case would be considered on its merits by County Court judges.
It has effectively said that people should apply to the court if they want their cases restarted, but there is no guarantee that they will succeed. Banks might also apply to have cases thrown out.
However, it said the Supreme Court judgement was quite lengthy so it could take some time for customers and the banks to decide what to do.
The Supreme Court ruling will come as a bitter blow to the consumer organisations who have campaigned against what they considered to be unfair overdraft charges.
The Court said it would not allow an appeal by the OFT to the European Court of Justice.
The OFT said that it was "disappointed" with the judgement.
Karen King: "I'm finding it really hard"
"The OFT will now consider the detail of this judgment before it makes a decision on whether or not to continue its investigation into unarranged overdraft charging terms," it said in a statement.
"It will also explore with others the implications for consumers and for existing and future legislation and regulation."
It said it would make another announcement in December.
Research by the OFT published last year found banks earned around a third of their retail revenues from unarranged overdraft charges that were "difficult to understand, not transparent, and not subject to effective consumer control".
Marc Gander, of the Consumer Action Group, said that he was "shocked" about the Supreme Court ruling.
"This is completely unexpected. It is a devastating blow," he said.
Phil Jones, from the consumers' association Which?, said that he was "utterly outraged" by the ruling.
But Martin Lewis, of Moneysavingexpert.com, said: "This may be a setback for reclaiming but it is not the end. The likelihood is the money is not coming back for anyone who has got claims on hold. There is still hope here, but we have got to do a lot of reading and a lot of legal work."
Some of these campaigners said that the OFT could explore other avenues to tackle the banks about charges, but this would require another round of litigation.
The British Bankers Association, which represents the banks, said it considered the decision as a "clarification of the law" rather than a "victory".
Individuals can avoid any charge by putting their overdraft arrangements in place first
Angela Knight, BBA
"We recognise this issue has been of real concern to a large number of our customers and we are pleased that this decision now brings clarity for all parties," it said.
"The banks will work with the regulators to ensure that the outstanding customer complaints are brought to a swift conclusion."
Angela Knight, from the BBA, was asked whether they would continue to make unauthorised overdraft charges.
"The banks are mindful of their customers, they know the concerns of those who have paid the unauthorised overdraft fees and those who have not," she said.
"Individuals can avoid any charge by putting their overdraft arrangements in place first."
Asked about the case at Prime Minister's Questions, Gordon Brown said that it was correct to examine the fairness of charges.
He said government-supported banks - Northern Rock, HBOS and RBS - had recently been asked to review their overdraft charges so that they were fairer to customers.
Sarah McCarthy Fry, Exchequer Secretary to the Treasury, said the government was "determined" to make sure the system was made fairer in future.
"Consumers, who have been waiting a number of years, will be extremely disappointed with this outcome.
"It is clear that in the past, banks were not thinking enough about their customers. That needs to change for the future.
"The government will work with the OFT and Financial Services Authority to reach a new framework for fairer bank charges going forward."
Shadow Financial Secretary Mark Hoban said: "This is a blow for consumers. The OFT have said they will explore the use of other powers to investigate and we support that. We have already called for a competition review of banks - it must include consumer banking charges.
"In the meantime this judgement simply perpetuates the uncertainty over bank charges which is damaging for the entire industry."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.