A long-serving high school teacher was secretly downloading and peddling shocking images of child abuse at his home.
Brian Rafferty, 54, former head of English at Morecambe Community High School, admitted seven offences relating to indecent images of children and animals.
Police found hundreds of images during a raid in September last year.
Rafferty, of Market Street, Carnforth, was jailed for 16 months at Preston Crown Court.
The divorced grandfather, who taught at Morecambe High for more than 20 years, will be subject to a Sexual Offences Prevention Order for 10 years banning him from contact with any under 18s, including his grandchildren, and restricting his internet access.
He was suspended from the school last year and has now been sacked.
The case has led to intelligence being passed to investigators in other countries so they can investigate paedophiles.
Prosecuting, Susan Carter told the court some of the images concerned real children being sexually abused.
Others were sickening cartoon images or drawings depicting youngsters being attacked by adults.
He also pleaded guilty to possessing sexual images involving animals.
Rafferty was an English teacher and also taught drama to pupils before the offences came to light.
DC Sarah Chadwick, of Lancaster Police’s public protection unit, said his home had been raided after intelligence had been passed on to the force.
She added: “We seized several different devices containing the offending images including a computer.
“The school suspended him straight away and have cooperated with us throughout.
“None of the offences relate to children at the school.
“However, we have shared information from this investigation with other countries to enable them to investigate similar offences.”
Matthew Auger, head teacher at Morecambe Community High School, said: “Mr Rafferty was suspended from school with immediate effect when the allegations came to light in September 2014.
“His contract of employment was terminated once we were made aware of the sentence.
“I’d like to make clear that none of these offences relate to pupils at our school.
“We are relieved that the legal process has now concluded as our key focus is always to provide our pupils with an excellent education.”