Lawyers representing low-paid women workers at Glasgow City Council have won a long-running equal pay case.
The Court of Session decided a re-grading scheme introduced in 2007 may have provided less favourable treatment for women workers.
Campaigners argued that women such as home carers were left earning thousands of pounds less than men in jobs such as gravedigging or refuse collection.
Glasgow City Council said it would consider the impact of the ruling.
The judgement is the latest in a series of complex cases concerning the way jobs were re-graded by councils to address equal pay issues.
In May the court ruled that thousands of women employed by the council had been excluded from bonuses for years.
The latest judgement quashed an earlier ruling by the Employment Appeal Tribunal that the council's job evaluation scheme was valid in terms of equal pay laws.
The judges said the burden of proof rested with the council to demonstrate that it complied with the law - and that it had failed to produce sufficient expert evidence to do so.
Susan Aitken, leader of Glasgow City Council, said: "This is a complex ruling about a complex matter. It is right that the council takes some time to consider the immediate impact and wider ramifications of this ruling.
"Council officers will require time to consider all the implications of this ruling, but I have instructed them to continue to speak to the trade unions about the application of the pay and grading scheme.
"We have recently settled the long running janitors' dispute and we are actively working with the trade unions to settle all cases relating to pay protection, where a number of women continued to be paid unequally even after the introduction of the new pay and grading system."
She added: "The city government was elected on a commitment to improve industrial relations in Glasgow City Council, including resolving inherited outstanding equal pay cases. Today's ruling has not changed that position."
About 6,000 women are already pursuing equal pay claims against the council, but campaigners said the ruling could lead to many more.
The trade union Unison said the re-grading scheme was unfair because it made it impossible for employees to know if they were being paid equal pay for equal work.
Unison's Scottish secretary Mike Kirby said: "This judgement that the Glasgow scheme is flawed is great news for low paid women workers.
"The way Glasgow rates and pays workers has been the source of conflict and division for ten years.
"These women have already waited long enough to receive the pay they have worked hard for and deserve. It's time for Glasgow City Council to do the right thing and pay up on equal pay."
Action 4 Equality Scotland (A4ES) - which represents thousands of claimants - said the council's pay arrangements resulted in people employed in female-dominated roles, such as home care, receiving on average £3 an hour less than those in traditionally male roles.
Stefan Cross QC, from A4ES, said: "We have been saying for years that the city council could not justify paying highly skilled, hard working staff like home carers so much less than gardeners, gravediggers and refuse workers."
The Court of Session has now asked the Employment Tribunal to reconsider the matter.