A retired head teacher who received an MBE for services to education has been jailed for six child sexual offences.
David Watkin Bundock, 74, used a messenger app on his mobile to discuss sexual activity with young boys.
He pleaded guilty to possessing indecent images of children and attempting to engage in sexual communication with a child.
Bundock, of Cardiff, was jailed at Swansea Crown Court for two years and three months.
He had also admitted one count of grooming a child.
Judge Keith Thomas said Bundock had committed "appalling offences" in secret from those who knew him, letting them down after the end of a long career in which he had "achieved a great deal".
"You set yourself against moral values you'd previously espoused," he said.
Bundock, who was awarded an MBE in 2004, committed the offences between October 2017 and January this year.
The offences were not related to his time as a head teacher at a number of primary schools in Llandysul, Ceredigion.
The court heard Bundock first came to the attention of police when they found his mobile number on the phone of another man who had been arrested for distributing indecent images in March 2017.
Prosecutor Jim Davis QC said the two men had been in contact on WhatsApp messenger and had discussed children in "graphic and depraved terms".
When officers arrested Bundock they found he had been using the Kik messenger app on his mobile to discuss sexual activity with young boys.
Mr Davis said the former teacher had told one 14-year-old boy that he "couldn't wait to be naked with him".
The court heard Bundock had been "subject to a sting" by a vigilante paedophile-hunting group which had created the persona of a 15-year-old boy on a dating app.
Mr Davis said at one point he commented on how he had been a teacher, writing "it would have been nice to have you in my class", before organising to meet him at a car park in Carmarthen.
When Bundock arrived he was confronted by members of the group. He was arrested several hours later at his home address.
Despite first being arrested in July last year, the court heard Bundock had then gone on to commit a further grooming offence while on bail.
His defence barrister India Cox QC said Bundock's behaviour had been "completely and utterly out of character" and his family had struggled to come to terms with what he had done.
Bundock was also issued with a sexual harm prevention order and barred from working with children.
After the hearing, Det Sgt Llyr Williams, from Dyfed-Powys Police, said the investigation, in collaboration with South Wales Police, identified an "individual who was intent on taking advantage of young children".
He said: "We understand the concerns people have in relation to the safety of their children online and the desire to protect them. The police are best placed to deal with this."