A DRUNK student who bent down to tie his shoelaces in the middle of the road could have been killed, a judge said.
Chris Nolan (20) was narrowly missed by a car as he tied his laces after a night out in Dundrum.
He went on to give gardai a false name.
Judge Ann Ryan said she would strike charges against him out if he made a donation to charity.
Nolan, of Ballinteer Crescent, pleaded guilty to public intoxication, causing an obstruction to traffic and giving gardai a false name.
The incident happened at Overend Way, Dundrum on January 13.
Dun Laoghaire District Court heard he had been walking through Dundrum Village when he leaned down in the middle of the road to tie his laces.
A car just missed him, Sgt Peadar McCann said.
When gardai spoke to him, he gave them an incorrect name and date of birth. As they tried to verify this, he ran off and was apprehended a short distance away. He apologised to the court.
"Your behaviour was completely unacceptable," Judge Ryan said. "You are very lucky you are not dead. If the gardai had not come along, something could have happened, a car could have hit you."
The defendant insisted he had been tying his laces in a cycle lane and not the middle of the road.
"That is an exaggeration," he said.
Nolan said although he was intoxicated, he had been "aware of himself".
He had no previous convictions and was due to go back to college in September.
The judge said she would strike the charges out if he made a €100 contribution to charity.