A driver lost control of his speeding car and crashed into a set of pedestrian lights after running a red light at a busy junction.
Martin Lieghio (32) had turned away from a garda checkpoint before reaching speeds of over 100kph in a built-up area.
Swords District Court heard that cars on the busy Malahide Road were forced to skid and swerve to avoid a collision.
Judge John Cheatle told Lieghio he could have killed someone.
The judge ordered him to complete 220 hours of community service in lieu of four months in prison and banned him from driving for four years.
The defendant, of Buttercup Park, Darndale, admitted driving without insurance and dangerous driving.
Det Gda Brian Reidy said he was conducting a checkpoint on Glin Road, Coolock, shortly after 11pm last May 29 when he saw a car do a U-turn.
The officer said he followed the car on to Greencastle Road, where it hit speeds of more than 100kph in a residential area.
He said Lieghio drove over the small roundabouts on Greencastle Road rather than going round them.
Gda Reidy said the lights were red when Lieghio came to the junction of Greencastle Road and Malahide Road.
However, the defendant did not slow down, and tried to turn left on to Malahide Road as oncoming traffic skidded and swerved to avoid him.
Gda Reidy said Lieghio lost control and slid into a set of pedestrian lights before the vehicle landed on its side.
Defence solicitor Fiona D'Arcy said Lieghio could offer no real explanation for his behaviour.
She said her client had had a drug problem in the past but had been clean for some time.
Lieghio had turned his life around and was now working in construction, she added.