Robert Saunderson (67) was told the decision not to put him behind bars “was borderline’’.
Saunderson had already pleaded guilty and has since repaid most of what he stole.
Antrim Crown Court was told he also alerted authorities to £6,000 he had “uncovered’’ himself.
Just over a week ago, he was handed a two-year jail sentence suspended for three years.
“I don’t think I have ever come across someone identifying further money that they have stolen and offering to pay it back,’’ a prosecution lawyer told the court.
Saunderson was treasurer for Glenwherry Presbyterian Church in Co Antrim.
Alarm bells first rang when the church carried out an audit of two accounts, revealing a discrepancy of more than £21,000.
“The treasurer of the church, Robert Saunderson, who had been the church treasurer for approximately 18 years, was approached and he advised that he had the missing funds in his home safe but had lost the key,” said the lawyer.
When no money appeared, Saunderson admitted he had spent some of the money but would repay it.
“At this stage, Glenwherry Presbyterian Church accepted this and thought that was the matter resolved.”
It then emerged Saunderson had stolen a much larger sum of money.
He had written cheques for himself and his wife “by falsifying the church records in relation to oil payments, missions donations and United Appeal monies”.
Saunderson was arrested, questioned and admitted he did not keep a record of what he had stolen.
The dairy farmer told detectives he needed the money to pay personal bills and had planned to pay it back.
The court was also told his wife was questioned but told police she had no idea her husband had been taking money from the church and only discovered that he had after his second police interview.
A defence lawyer accepted the offences represented a “monumental fall from grace”, but he had been told to “state publicly, in court, that he (Saunderson) expresses his deepest and sincere apologies and remorse concerning his disgraceful conduct”.
He described how the offences had not just affected Saunderson, but also his entire family who have “in essence, become social pariahs”.
“They live in a rural community where the church and church activists were central to their lives,” the lawyer said.
“Meetings, recreational activities, that has all ended and they feel that very much and they understand why people are so grossly annoyed.”
Urging the judge not to jail Saunderson, he added: “The lifetime of work and the legacy his father left him will never ever be right again... his livestock, his flock of pedigree sheep, they cannot be taken into care but will be sold and sold very immediately and the farm will be brought to an end.”
The court was told Saunderson had bought a number of rental properties and land but they turned out to be a “complete and total financial disaster… an additional millstone around his neck” and it was then that he began to take money from the church.
Judge Neil Rafferty said it is clear Saunderson “is ashamed and that he has deep regret about what he has done and the loss of his reputation within the church and the wider community”.
He said Saunderson deserved credit for his plea, the fact he had paid the money back, and the way he had alerted the authorities to the extra money.
The judge told him: “The reality, Mr Saunderson, is that at 67, you have lost your good name, lost the standing that you had enjoyed in the community and you must live with the knowledge that you have done all that by your own hand.
"You have just about escaped an immediate custodial sentence and again, you only have yourself to blame for that.”