Children's literature which depicts head teachers as "sadistic" and "evil" helps youngsters learn about authority, new research suggests.
School-based novels encourage children to think about power and whether it is being used wisely.
The research by Pat Thomson, of Nottingham University, considered the characteristics of head teachers in 19 children's books written since 1970.
Of these, nine heads are portrayed negatively, from the "evil and messianic" head in The Demon Headmaster by Gillian Cross to the "sadistic, child-hating" Miss Trunchbull in Roald Dahl's Matilda.
A further six are "remote" figures of power.
Just one, Professor Dumbledore of the Harry Potter series, played in the films by Michael Gambon, is seen positively, described as "wise" and "moral".
Many of the novels show that power can be used for evil purposes, the report says.
It concludes: "Plots teach that unreasonable norms, those which curtail responsible freedoms, must be and can be overcome and that children who make the wrong choices must learn to be responsible. In each of these two options, it is the head teacher who is the ultimate authority with the power to sanction and reward, to discipline and punish."
Professor Thomson adds that children's literature is often more honest about the role of a head teacher than educational texts.