A young man caught behind the wheel a month after he received a two-year driving ban had just split from his girlfriend, a court heard.
Jonathon Barr (20) was "not in a good place mentally" at the time he was stopped by gardai, his solicitor claimed.
Judge David McHugh imposed a two-month sentence but suspended it for 12 months. He also ordered Barr off the road for four years.
The defendant, of St Finian's Grove, Lucan, admitted before Blanch- ardstown District Court to driving without insurance or a licence.
The incident happened at Blanchardstown Road South on January 10.
The court heard that Barr has a previous no-insurance conviction.
Defence solicitor Liam Cadogan said father-of-one Barr was not in a good place at the time of the incident, following the break-up of a serious relationship last December.
He said it had had a serious and negative impact on the defendant, and he has been on antidepressants.
The solicitor said Barr, who is unemployed, is living at home with his mother and stepfather and they have been a "tremendous support" to him.
Mr Cadogan asked Judge McHugh not to send Barr to jail, saying that "custody wouldn't suit him".