The decision follows years of legal wrangling after investment bank Lehmans went bust in 2008 with its UK-based pension fund £148 million in the red. Communication giant Nortel's European fund was £2.1 billion in debt when it collapsed in 2009.
Company administrators had asked for clarification of the law after the Pensions Regulator moved to issue against them a financial support direction - a statutory scheme designed to protect employees from under-funded pension schemes.
The decision overrules previous findings by the High Court and the Court of Appeal that the costs of complying with an FSD issued against an insolvent company would rank as an expense of administration or liquidation.
Tony Bugg, global head of restructuring and insolvency at Linklaters, which advised the Lehman administrators, described the ruling as "a victory for common sense".
He said: "It will be welcomed by unsecured creditors and the lending community alike, as these sorts of pension liabilities would swamp most insolvency estates leaving nothing for creditors. It also lays down principles which will govern how other statutory liabilities will rank in an insolvency - while something to be determined on a case by case basis, the Supreme Court's judgment is clear that they will ordinarily simply rank with other unsecured creditors."
He said: "An insolvency pits employees, pensioners, suppliers and other creditors against one another each fighting for a share of a limited pool of funds. The Supreme Court rightly decided that only the clearest of legislative intent should enable one group of creditors to claim priority over another."
Insolvency trade body R3 described the decision as a "landmark" one. Giles Frampton, vice-president of R3, said it "appears to restore a fair balance between the rights of pension funds and other creditors in administrations".
Jonathon Land, partner at PwC and adviser to the trustees of the Nortel Networks UK Pension Trust, described the decision as "the fairest result". He said: "After three years of litigation UK pension schemes and insolvency practitioners will be thankful they finally have clarity on this issue."