An Irishman who abused a police officer by hurling insults at him has been sentenced to climb a holy mountain instead of being sent to prison.

Donegal man Joseph McElwee, 38, was drunk outside a pub when he began verbally abusing an off-duty policeman.

He called him a "Mayo wanker" and told him to "f...off home to Mayo". Police officer  Nicholas Freyne saithe abuse continued for 10 minutes.

Judge Seamus Hughes, a Mayo native himself, questioned the defendant about whetherr he had ever been to County Mayo or climbed the holy mountain there, said to have been climbed by St.Patrick ,called Croagh Patrick.

Croagh Patrick is an annual pilgrimage site where pilgrims pray at four different stations during the difficult climb

"I want you to come back in a month’s time with evidence that you did the four stations of Croagh Patrick and say a few prayers. You then might have a different impression of Co Mayo and its people,"the judge said.

Judge Hughes handed down the sentence after hearing the defendant was one of three men who approached the policeman and verbally abused him.

His lawyer Kieran O’Gorman asked the judge how would be know if the defendant  climbed the holy mountain.

Judge Hughes replied that he will have questions prepared: "You’d better have the answers, and I will know whether you are telling the truth or not."