An English teacher has won a sex discrimination case against a school in the Borders.
The tribunal heard that Ms Rowley was an experienced teacher
A tribunal ruled that Susan Rowley, who taught at Berwickshire High, was discriminated against when she was turned down for a promotion in 2004.
Scottish Borders Council was told to pay Mrs Rowley £21,000 after the job was given to a less-qualified man.
David Hume, the council's chief executive, said recruitment practices had been reviewed following the ruling.
Mrs Rowley, who has now left the profession, was an experienced teacher with a postgraduate qualification.
The employment tribunal heard the colleague who got the job of principal teacher pastoral did not have the experience or qualifications directly related to the post.
Other candidates for the post had been told that Mrs Rowley's qualifications and experience were of no advantage to her.
They were also told the job would be given only on the basis of answers given at the interview.
The tribunal found that the recruitment process was hasty and the school's rector had watered down the personal specifications to favour the successful candidate.
It said the rector had failed to properly follow SBC's own policies and procedures.
The council was told to pay Mrs Rowley £16,000 in compensation and £5,000 for injury to her feelings.
Following the decision, she said: "To have put in so much work gaining the qualifications and experience required to be a good pastoral care teacher and then see it count for nothing was frustrating and disappointing.
"Although I have now left Berwickshire High, I hope my case will make SBC take action on recruitment issues and make sure this does not happen to other women teachers."
The Equal Opportunities Commission Scotland, which supported the case, said it showed sex discrimination was still being openly practised in Scotland.
Rowena Arshad, EOC Scotland commissioner, said: "This case serves as a cautionary tale for anyone who is involved in recruitment and selection of staff.
"When policies and procedures are ignored sex discrimination can creep in and the best person for the job can lose out."
She said it was crucial the recruitment process was transparent or it could leave schools open to "jobs for the boys" allegations.
Speaking after the ruling, SBC's chief executive said steps had been taken to address any previous problems.
"As an organisation one of our key values is equality of opportunity, and sexual discrimination is simply not tolerated in this council," said Mr Hume.
"Our policies, training programmes and recruitment procedures in 2004 (when the case arose) were not consistently applied across the council.
"This I believe is the nub of the issue and it is something we have addressed and continue to give this a high priority."