"Somewhere in the early 1840s there was a dispute between the parents and the master and pupils began to be withdrawn from the school.
"Ultimately all the pupils were withdrawn and the master was left in a school with no children."
The Church of Scotland sought to sack the head teacher, but he refused to go, arguing that he had a contract and it did not specify that the school had to have pupils.
The row reached the courts and the Court of Session upheld the teacher's contract.
Mr Bruce said: "For 19 years he remained in the school before a change in the law eventually saw him sacked."
Source: here