A dentist eating his lunch at his place of work found himself confronted by an intruder armed with a knife, the Circuit Court was told.
The man who broke into the Bridge Dental Clinic on March 13 last was Michael McDermott from 19 Baile Eoghan in Gorey.
The 49-year-old heroin addict pleaded guilty to aggravated burglary and to making threats against the gardaí who arrested him that day.
Garda Patrick Malone gave a summary of what occurred to Judge James McCourt.
On the day in question, dentist John Kinsella was alone inside the clinic when he heard a commotion at the locked front door.
McDermott broke in and the knife was produced as he demanded help from Mr Kinsella.
The defendant attempted to remove a package from the reception counter but the dentist took it back. The would-be burglar appeared to be intoxicated.
He left the premises and began throwing glass bottles at members of the public before Garda Malone and a colleague arrived.
They discovered that he had cut his own neck, chest and face before being taken into custody.
Shown security camera footage from the clinic next day, McDermott recognised himself but had no recollection of what he had done.
Defending counsel Jordan Fletcher revealed that his client began smoking cannabis at the age of nine and was addicted to heroin at 15.
A list of 98 previous convictions, imposed by courts in Dublin, Wicklow and Wexford, was acknowledged.
He was now drug free, stated Mr Fletcher, and on a methadone programme while detained in prison.
‘You have an appalling past record.’ said Judge McCourt before sentencing McDermott to three years in jail, the term to run from April when he was taken into custody.