Today's ruling is a blow for the millions of consumers who had hoped to reclaim more than £1 billion of the fees.
More than one million claims to have the charges refunded have been put on hold since the test case was first launched in 2007, while a further eight million people are estimated to have paid the charges since July 2001, but not yet submitted a claim to get their money back.
But the ruling is better news for the millions of consumers who do not dip into the red without permission or breach their agreed overdraft limit, as the banks had warned that losing the test case could herald the end of free banking in the UK.
The news is also a relief for the beleaguered banks who faced having to make refunds totalling more than £1.1 billion if they had lost the case, while they were also likely to have lost a significant chunk of the £2.6 billion of revenue they receive from the charges each year.
But the Supreme Court's decision that the charges do not come under "unfair contract" rules and are therefore not subject to regulation by the Office of Fair Trading, is unlikely to be the end of the issue.
Handing down the ruling, Lord Phillips, president of the Supreme Court, said: "It may be open to the Office of Fair Trading to assess the charge under other criteria."
The OFT said today that it would consider the judgment before making a decision on whether or not to continue with its parallel investigation into unauthorised overdraft charging terms.
It added that it would be seeking discussions with banks, consumer groups, City regulator the Financial Services Authority and the Government in the light of the ruling.
The Government also said it was "determined" to ensure the system of unauthorised overdraft charges was made fairer for consumers in the future.
Sarah McCarthy Fry, Exchequer Secretary to the Treasury, said: "The Government will work with the OFT and FSA to reach a new framework for fairer bank charges going forward."
Customers who go into unauthorised overdraft or breach their agreed limit can be charged as much as £35 or more for a single bounced payment. Campaigners claim the actual cost to the banks could be as little as £2.50.
Industry commentators had warned that without these charges, existing free current accounts could be replaced with ones that either have a flat monthly fee or charge for every transaction carried out, as is common in many countries around the world.
But while banks will no longer face the prospect of being forced to reduce their charges as a result of the test case, the legal action has still triggered changes in the way the charges are levied.
Many banks had already altered the structure of their unauthorised overdraft fees ahead of today's ruling.
Some banks have introduced tiered charges, while others have gone to daily fees, flat monthly charges or lower one-off fees, and many have also introduced caps on the total amount of charges that people can run up in one month.
Banks are also likely to continue the process of migrating customers on to more profitable packaged accounts, under which consumers pay a monthly fee in exchange for a range of services on top of their current account, such as free annual travel insurance and breakdown cover.
Around 45% of current accounts now charge a monthly fee of some kind, up from just a third in 2006.