The former head teacher of an infant school who discussed child sexual fantasies with other men has been jailed for possessing indecent images.
Daniel Chapman, 31, sent hundreds of pages of "depraved, revolting and broadly sadistic" messages to four men, a judge said.
He had previously claimed he was acting as a paedophile hunter.
Chapman was jailed at Chelmsford Crown Court for 30 months and put on the sex offenders register for 10 years.
He admitted 12 counts on the first day of his trial in October, including possessing indecent images and publishing indecent articles on messenger sites.
Chapman, of Meadgate Avenue, Chelmsford, was suspended and eventually sacked from his role at Hilltop Infant School in Wickford, Essex, following his arrest in May.
No children from the school were involved.
The court heard hundreds of pages of messages had been exchanged between Chapman and four other men, while dozens of indecent images and two videos were found on his phone.
As part of his teaching role he had taken a course about safeguarding children from abuse online. His expert knowledge of the effects of abuse was given as an extreme aggravating factor.
Judge Patricia Lynch QC said: "He knew full well the damage being done to children."
Kevin Toomey, mitigating, acknowledged the messages sent by Chapman had been "grotesque" but that his client was full of remorse and felt "ashamed and embarrassed" by his actions.
In addition to his prison sentence, Chapman was also given a sexual harm prevention order.
A statement for Hearts Trust, which runs Hilltop Infant School, thanked police and praised parents and staff for their patience and dignity.
Investigating officer Det Con Nick Riley said Chapman's actions "involved some of the most horrific social media messaging concerning child abuse that I had ever investigated".