A former Spalding teacher has been given a suspended jail sentence after he admitted having indecent images of children on his home computer.
Andrew Wharam, 54, was teaching at Spalding Grammar School when police executed a search warrant at his then home in the town in February last year.
Lincoln Crown Court heard officers forced entry to Wharam's address because no one was in and seized a computer tower which was later found to contain 51 still indecent images of children.
Phil Howes, prosecuting, said 700 indecent cartoon images of children were also recovered from a USB stick found in one of the bedrooms.
Mr Howes told the court Wharam was located by police at Spalding Grammar School where he taught.
"He dropped his head and said he was responsible," Mr Howes added.
Only one of the 51 still images was found to be in the most serious Category of A, with 3 in Category B and 47 in Category C.
During his first police interview Wharam said he had been led to illegal images by his addiction to legal pornography and had gone on to a Russian site after using a search for "young girls."
Mr Howes said Wharam told police where to find the images on his computer tower which he had hidden from his wife.
He admitted having an interest in girls aged from 12 to 13 upwards, but Mr Howes said there was absolutely no suggestion Wharam had behaved inappropriately at his school.
Bruno Haine, mitigating, told the court Wharam had no previous convictions and had both helped the police and sought treatment from an abuse charity.
Mr Haine said Wharam had now moved to Southampton after cutting all his ties from Spalding and had got a job as a labourer.
"He is estranged from his wife," Mr Haine added. "He has lost his good character, his job and his family."
Wharam, now of Bassett Dale, Southampton, pleaded guilty to three charges of making indecent images of children and one charge of possessing 700 prohibited cartoons between 20 May 2016 and 27 February 2017.
He was sentenced to six months imprisonment suspended for two years, must register as a sex offender for five years and was made the subject of a Sexual Harm Prevention Order.
Passing sentence Recorder Gareth Evans QC told Wharam he was going to spare him jail because there was just one image in the most serious category and he had helped the police.
Recorder Evans said: "As a result of your addiction to pornography you have lost your wife and your job."