A man who wanted a lift home broke into a car and then tried to ram it through electric gates.
Lee Rowley, of 8 Dromleigh in Bantry, Co Cork pleaded guilty to one charge of criminal damage and another of unlawfully taking a vehicle when the case came before Skibbereen District Court.
The incident occurred at Clashduff, Drimoleague on January 23 last. Sergeant Paul Kelly told Judge James McNulty that Rowley, who is 19, had gone to a friend's house with three others in Drimoleague and had been drinking.
Before midnight Rowley left the house on foot and walked to a nearby house.
He entered the garden, got into the vehicle that was there, and started it up.
The entrance was closed by electric gates and Sgt Kelly said Rowley tried to drive through the closed gates by ramming them. He said he did not manage to get through the gates but caused "considerable damage".
Rowley left the scene on foot and the householder, who had been at work, arrived home at 4am to discover the scale of the damage.
The car was a write-off, the court heard, and the damage caused amounted to €4,000.
However, the owner also had CCTV installed at his premises and it identified Lee Rowley as a possible suspect.
He was subsequently arrested and initially denied any involvement, but on viewing the CCTV footage he admitted what he had done.
The Director of Public prosecutions had instructed that the matter be dealt with at district court level on a guilty plea only.
The court heard that Rowley had four previous convictions and had served time in youth detention for a serious assault.
His solicitor, Flor Murphy, said his client had had a difficult childhood.
As for the incident, Mr Murphy said his client had wanted a spin back to Bantry but none was available.
Judge McNulty said he considered the matter to be "at the high end of the scale" in relation to the taking of a vehicle.
"Thankfully it did not cause any injury to anyone but it wasn't for the lack of trying," he said.
The judge acknowledged some mitigating factors including Rowley's difficulties and some trauma in his life and he sentenced him to eight months in prison, on each charge, to be served concurrently.