There was no obvious reason to do it. Malcolm Scott had a good job, as a technology teacher at a successful comprehensive. His career was going well, and he had received offers of promotion. He was well liked by colleagues. His head valued him and was prepared to overlook the fact that he suffered from depression.
And yet Mr Scott had, on several occasions, logged on to school computers and looked at images of naked women in explicit poses. One, called Only Tens, had obvious appeal to the teacher accustomed to regular marking: it involved grading women from one to 10.
The first - and most obvious - question in such cases is: why? Whatever one's personal proclivities, there is a time and a place for such things. It is a rare teacher who does not have access to the internet at home. So why would someone jeopardise their career and risk a potentially humiliating exposure by using a school computer and seeking out porn sites?
Despite its ubiquity, and the publicity surrounding high-profile sex "addicts" - the most recent case being the golfer Tiger Woods - porn has lost none of its embarrassment factor. The growth in internet use has made it easily accessible. But it is about more than seeking a thrill or just satisfying curiosity, according to psychotherapist Phillip Hodson of the British Association for Counselling and Psychotherapy.
"The issue is why anyone would be daft enough to use the school computer for that sort of thing? It's evidence of an absence of common sense in our world," he says. "It's like fiddling your expenses: it's completely wrong and silly and likely to lead to trouble. It shows either an infantile lack of judgment, or that your mind is on the wrong sort of job."
But using porn can also be a way of dealing with stress, just as we use drugs or alcohol, says Jason McClain, a former addict who works as a porn addiction therapist. And such coping mechanisms may be more widespread in a high-stress occupation such as teaching. "For a lot of guys who fall into compulsive behaviour, porn becomes their way of managing their emotions," Mr McClain says. "If you're feeling bored or stressed, the anticipation of getting that little glimpse is a way of numbing those feelings."
For some men - and most documented porn addicts are men - porn can also offer a way of reclaiming control, something teachers are constantly chasing. "A secondary school teacher has to deal with adolescents who are rebellious, demanding and cheeky," says Carlos Fishman, a psychotherapist at the Portman Clinic in London, which specialises in compulsive sexual behaviours.
Teachers can feel frustrated and humiliated by teenagers who are standing up to authority. Looking at pornography may be an attempt to reverse this and restore any slight against self-esteem, he says.
"By looking at pornography and identifying with the cruel, alienated performer of pornographic scenes, that sense of masculinity is temporarily restored," he adds.
Despite the risk, there is still a feeling that if you are really careful, no one will catch you. David Hugo, a Year 1 teacher at a school in Cornwall, managed to accumulate a box of explicit magazines in his classroom cupboard before the school electrician uncovered the stash.
"Very often, just accessing pornography stops being satisfying," says Mr Fishman. "It's like a drug that doesn't work. People start hoarding images and films. They collect thousands of images, with the aim of coming back to them. Or they look for more sadism, more cruelty."
This can escalate into a compulsion to look at porn more and more frequently, until it intrudes into working hours.
Mr Hugo's box of magazines was concealed beneath football kit. But the cupboard was left unlocked during the summer holidays. He was banned from teaching for two years. "He said he had been a prat," his head said at the time.
Looking at porn in the workplace can also heighten feelings of control. "Looking at porn at work is a slightly deluded control trip," says Mr McClain. "There's the thrill that it might all go wrong, the buzz of possibly getting caught."
About 50 per cent of internet traffic is now sex-related. A 2005 survey found that one in four men between the ages of 25 and 49 had downloaded images from pornographic websites within the previous month. Around 1.4 million women and nine million men were estimated to have accessed porn sites that year.
Porn addiction can have very little to do with sex. Depression, low confidence or lack of self-esteem can trigger it, or porn can become an outlet for feelings of alienation and aggression. It can also compound feelings of shame or humiliation. "They feel they have failed themselves, failed their standard of morality," Mr Fishman says. "That can be true if someone is in a position of responsibility."
Mr McClain is regularly contacted by men unable to confine their addiction to the domestic sphere. "The problem is that porn becomes the default method of managing your emotions, giving yourself a bit of a lift," he says.
"Whenever you're stressed, you persuade yourself that looking at porn will be satisfying. But you also feel resentment, self-loathing and guilt. So the urges kick in again. You're locked in this cycle of behaviour. It's fool's gold: you're always kidding yourself that if you just look at porn, you'll be satisfied."
But porn addiction can also change the way sufferers view the world, which can be troublesome for teachers. Spending a significant portion of your day looking at sexual images can lead you to see the world through what Mr McClain describes as "porn goggles". He adds: "People find themselves in an objectifying, sexualised world. You're walking around at work, and everyone is a sex object."
While most porn addicts are not paedophiles, the dangers of turning everyone into a sexual object are heightened in schools, particularly when you are surrounded by adolescents who are discovering their own sexuality and who use sexual imagery.
"There's the possibility that someone is standing in front of a class, objectifying the kids," says Mr McClain. "That's also part of the guilt and the shame and the come-down. Guys realise that they're in the porn zone of sexual frenzy, that bizarre buzz. Then they beat themselves up about it." The worse they feel, the greater the urge to seek solace in porn.
Malcolm Scott's internet indiscretions were eventually discovered by the school's data communications manager, who, together with a sixth-former on work experience, was conducting routine checks on Mr Scott's computer. Police were called, the General Teaching Council for England (GTC) notified, and the technology teacher was banned from the classroom for at least two years.
For some, the need is so great that they ignore all the warning signs. Darren Adamson, head of English at a secondary school in Tyne and Wear, walked into a lesson and set his pupils some classwork. Then he logged on to his computer and typed in the words "camcandy.com". When he hit the return key, a warning immediately flashed up: accessing such sites was not allowed on school computers. Did he want to continue? Mr Adamson hit "yes, continue".
Later, during planning and preparation time, Mr Adamson called up the premium-rate telephone lines linked to one of the sites he had been looking at. He had, he said, been experiencing severe personal difficulties at the time.
The GTC ruled that Mr Adamson had "brought the standing and reputation of the teaching profession into serious disrepute". But he was allowed to continue teaching after assessment by a psychiatrist, as long as he agreed not to use school computers to view explicit material.
It is possible to overcome porn addiction, just as it is possible to overcome alcohol, drug or gambling addictions. The key lies in taking away the power that porn holds. "Through treatment, people can understand the things that drove them to feel and behave that way," says Mr Fishman. "They can find a wider repertoire of behaviours and thoughts that will enable them to deal with events in the classroom."
Addicts can also benefit from learning that they are not unusual: that they have merely fallen into a trap that has claimed thousands of other victims. "These guys feel like perverts," Mr McClain adds. "They feel completely distorted by the experience, like their relationships will never be the same again. They need to realise that porn is an external influence on them. It's not them. Once they're out of the habit, it will loosen its grip."
Mr Fishman believes discussing porn in sex education lessons in schools could help take away some of its illicit thrill. "Speaking about anything can be helpful," he says. "But porn needs to be talked about for what it is, for the people who watch it, for the people who produce it, for the people who distribute it."
He suggests porn could be treated in the same way that drugs are often discussed in school: as a potentially harmful part of 21st-century life that should be treated with caution. Teenagers could benefit from meeting an ex-addict who could speak about its effects.
"Some level of porn exists everywhere: in adverts, cinemas, theatres and the like," says Mr Fishman. "We get aroused by images all the time. But when it becomes a compulsion, when you're avoiding real relationships, that's when it becomes a problem."