The women claimed parity with principal teachers after carrying out similar duties but without the financial reward.
Had the Lords upheld the appeal, it could have cost councils up to pound;17 million in back pay and thrown the Scottish Joint Negotiating Committee pay scales into confusion. Nearly 700 teachers throughout Scotland belonging to different unions would have been entitled to press claims.
The judgment has finally closed a loophole that appeared to offer hope to teachers. An industrial tribunal in Glasgow and the Employment Appeal Tribunal in Edinburgh supported their case but the Court of Session, Scotland's highest court, did not.
The lords accepted the former Strathclyde Region's argument that finance was the chief explanation for not paying teachers who were acting as unofficial department heads. In his judgment, Lord Browne-Wilkinson says: "I must state an agreed fact of the greatest importance. The disparity in pay between the appellants (the nine SSTA women) and principal teachers has nothing to do with gender. Of the 134 unpromoted teachers who claimed to be carrying out the duties of principal teachers, 81 were men and 53 women."
He said the purpose of the Equal Pay Act was to "eliminate sex discrimination in pay, not to achieve fair wages".
David Eaglesham, the SSTA's general secretary, said: "If the position remains that local authorities cannot afford to pay teachers for the work they do, there is something seriously wrong with education in Scotland." The union will now press for employment law to be changed on the principle of equal pay for work of equal value.
Linda Marsh, a spokeswoman for Strathclyde's 12 successor councils, said national agreements prevented new posts in areas like computing because older subjects such as classics were protected and promoted staff were on conserved salaries.