A career criminal survived a botched attack on his life before the gunman accidentally shot himself.
The 52-year-old intended target is in a serious condition in hospital after he was shot in the stomach in a north Dublin suburb this morning.
The gunman was attempting to flee the scene, an alleyway between Glasnevin Avenue and Glasnevin Park , when - about 50 yards away - a second shot discharged from his gun and hit him in the leg.
A senior Garda source said detectives are trying to establish a motive for the attack and who ordered the hit.
"There are no obvious links between the men," he said.
The intended victim has been described as a career criminal who was heavily involved in crime in the Ballymun and Finglas areas and who has links to the drugs trade.
He was cycling when he was shot in the street of a housing estate and rushed to the Mater Hospital for treatment.
He has several previous convictions for drugs, criminal damage, possession of a knife, public order, reckless endangerment and threats to kill.
The gunman, a 31-year-old from Finglas, was found injured in Hillcrest Park and taken to Beaumont Hospital.
He was known to gardai but was not a major player in Dublin's crime world.
The shootings took place at about 8.15am, shortly before hundreds of schoolchildren in the area started their first day back at school.
Forensic officers are examining both scenes, which have been sealed off by investigators who have removed two bicycles.
Gardai at Ballymun have appeal for witnesses.