All 32 local authorities, in a remarkable display of unity, have agreed to fight a bid by primary headteachers for equal pay with secondary colleagues.
Councils insist there is a substantial difference between managing a primary and secondary and have decided to contribute to the legal bill of South Ayrshire, which is fighting a test case. Costs could run to more than #163;100,000.
The primary-based Association of Head Teachers in Scotland is raising the action through an employment tribunal.
Anne Nutt, Kingcase primary, Prestwick, Stella Morton, Forehill primary, Ayr, and Paige Paterson, Girvan primary, are claiming parity under the Equal Pay Act 1970 with the heads of Carrick Academy, Maybole, Mainholm Academy, Ayr, and Mallaig High in Highland. These primaries and secondaries have similar roll numbers of 500-600.
More than 100 primary heads have submitted claims against authorities around the country and several hundred more are expected. The implications have forced the Convention of Scottish Local Authorities to step in with a joint defence.
If the heads win their case, which is likely to begin in Glasgow next spring and rumble on for several years, it could cost the authorities #163;70 million to make up the salary difference. Defeat is also likely to spawn similar cases by depute and assistant primary heads and nursery heads. The knock-on could reach #163;80 million, costing #163;150 million in total.
Christine Pryce, head of resource development in South Ayrshire, said councils believed the complexity of managing a secondary was far greater. The pay differential of around #163;7,000 for heads of similar sized primaries and secondaries was justified due to the range of management tasks.
Primary heads will argue indirect sex discrimination since it is mainly women who are primary heads and men secondary heads. South Ayrshire, which has no women secondary heads, will have to prove to the tribunal that there is no discrimination.
Ms Pryce said: "This issue is not just about numbers on rolls but the complexity of the secondary school operations which are significantly greater than in primary. The work of a secondary is less heterogeneous than the work of the primary because of the specialisms involved."
The council will argue that secondaries have larger buildings and budgets and more staff, and that the curriculum is broader. Heads are responsible for a wider range of staff, like laboratory technicians, librarians and language assistants.
The number of "discrete and functionally different departments" also places extra burdens on managers who have to liaise with more external agencies, such as careers officers and the Scottish Qualifications Authority.
One of the ultimate tests, South Ayrshire says, is whether the qualifications, skills and experience of primary heads would make them eligible or suitable for the post of secondary head.
The AHTS, however, will argue that they do "like work" or "work of equal value" to secondary colleagues and deserve to be paid on the same scale, based on size of school. The association says the heads can show discrimination because of the imbalance of women in senior posts in secondary.
Primary heads accept that secondaries are run differently but contend that they have more senior and middle managers to compensate. The lack of more management time is a long-standing grievance of the AHTS, a point now being accepted by councils.