A man crashed his car into a wall when he swapped seats with a friend struggling to navigate the dark country lanes.
Joseph Robinson called police who then arrested him after they smelled alcohol on his breath.
The 23-year-old pleaded guilty to drink-driving and using a vehicle without insurance.
He has since paid back the farmer who owned the wrecked wall.
Robinson was driving a BMW 118 when he lost control on a left hand bend and collided with a boundary wall.
The vehicle came to rest in a field and police were contacted.
Robinson, of Oak Rise in Cleckheaton, was arrested after giving a positive roadside breath test.
Further police station tests revealed that he had 52g of alcohol in 100 millilitres of breath.
The legal limit is 35 microgrammes.
The Huddersfield court heard that Robinson, who works for an engineering manufacturing firm, had no previous convictions.
Sarah Carter, mitigating, said that on the evening of the crash her client was at a friend’s house.
The owner of the BMW asked another friend who was sober to drive the car to get some cigarettes and Robinson went with him.
During the journey the friend got lost and he stopped the car and swapped seats with Robinson who took over the driving.
Mrs Carter said: “They were very narrow country lanes and unlit, he misjudged a corner and collided with a boundary wall which belonged to one of the farmers.
“He waited with the car for police to arrive and flagged them down. Although he’d had a few drinks he didn’t think he was over the limit.
“It was a moment of madness. He was trying to help out a friend who got into a muddle and lost on this country lane.”
Magistrates were told that upon his release from the police station, Robinson went to the farmer and offered to repay him for the damaged wall.
He and his friend who was in the car have also paid the owner of the vehicle for the damage caused to his car.
Magistrates banned Robinson from driving for 12 months.
He must also pay £415 fine, £85 costs and £42 victim surcharge.