A vicar has been sentenced to an 18 month community order after admitting looking at hundreds of indecent images of children.
The Rev Canon Nigel Cahill, the Rector of Aberavon, was suspended from his duties after being arrested at his Port Talbot home in June last year.
The 61-year-old had pleaded guilty to two offences of making indecent images of children between 2016 and 2020.
Judge Paul Thomas QC said Cahill would suffer significant public disgrace.
At a hearing at Swansea Crown Court on Monday, Cahill was also ordered to take part in a 45-day rehabilitation activity and to sign the Sex Offenders' Register for five years.
Judge Thomas said prison was not appropriate due to Cahill's lack of previous convictions, but the vicar had let a "large number of people down".
"They will feel a sense of betrayal by a man they looked up to and relied on for spiritual guidance," he said.
Cahill was arrested at his home in June after police found 219 indecent images of children on his devices.
The court had heard how Cahill used aliases when talking to people via Skype, and police cyber experts found his search history indicated a sexual interest in children.
Prosecutor Julie Sullivan told magistrates: "Mr Cahill said he was online talking to someone and looking at pictures of grown men.
"He said: "I'm not denying I have looked at younger boys. It's a problem I've had for years when I'm stressed. I drink and look at pictures online."
Church 'deeply saddened' by offences
Cahill was suspended from his duties by the Church in Wales immediately after his arrest last year.
In a statement on their website, the Church in Wales said it was "deeply saddened and shocked that one of its clerics had committed such a serious offence".
"We hold all victims of child abuse in our prayers," it added.
The Church in Wales said following his sentencing Cahill would be referred to the Disciplinary Tribunal of the Church in Wales, and the community had been provided with pastoral care.
"This was a crime committed despite our stringent safeguarding policies and procedures," it said.
"Mr Cahill exploited the trust and respect put in him as a cleric by the Church in Wales and by his parishioners and that will have long-term implications."
It added: "There is no place for any form of abuse in the Church in Wales.
"We want to make sure the Church in Wales is a safe place for our children to grow and to be nourished in the Christian faith."