A young man broke into a garda station, defecated on the counter and then stole a number of items, including garda hats, vests and radios.
Michael Brennan was caught on CCTV spending more than 25 minutes rummaging around Lifford Garda Station in Co Donegal.
Brennan broke in through the side window of the building just before 5am on September 5, 2015.
He was seen defecating on the counter of the station before leaving the building while still wearing a garda hat.
A swab was later taken from the faeces in a bid to track down Brennan.
Brennan (21) appeared at Letterkenny District Court, where he pleaded guilty to causing criminal damage during a burglary at the station.
Garda Inspector Goretti Sheridan told the court that Brennan was seen on CCTV entering the unstaffed station at 4.55am and spending 25 minutes inside.
He defecated on the public counter of the station before gathering a number of official garda items.
These included two garda caps, a pocket diary, handcuffs, a car key, a garda vest, a torch and two garda radios.
The court heard how CCTV footage showed Brennan walking down Bridge Street toward the nearby Co Tyrone town of Strabane wearing one of the caps.
Brennan, of Coneyburrow, Lifford, was eventually apprehended by the PSNI in Strabane and was still wearing some of the stolen items.
Some of his family helped to recover the other items, apart from the garda torch.
It was revealed in court how Brennan later appeared at Strabane Magistrates Court, where he was jailed for three months for possession of stolen goods.
"It was a fair cop in every sense of the word," said Brennan's solicitor, Donagh Cleary.
He said his client had suffered from drink and drug addictions but he was now back in the care of his father and living in Lifford.
He added that he had been punished in Northern Ireland for the crime and that there was no loss apart from the cost of the clean-up to the garda station.
Judge Paul Kelly said there was indeed a cost to the State for Brennan's "disgusting behaviour".
He was told by Insp Sheridan that the cost to clean up a cell if damaged is €225 and this would probably be the same cost.
"There was a repulsive message in what he did and a clear message was sent to the authorities and also by the way he paraded around," the judge added.
He adjourned the case until June 11 to allow for the €225 to be paid to gardai.
He added that he will keep in mind that Brennan has already served a sentence in connection with the crime in Northern Ireland.