A 27-year-old man was shot as he sat in a car outside a block of flats in the Scotstoun area of Glasgow.
Police said another car pulled up beside him in Kingsway Court at about 18:30 on Sunday and the occupants of the car discharged a firearm, narrowly missing him.
The victim drove off crashing his car a short distance away.
Detectives are treating the incident as attempted murder and have appealed for witnesses to come forward.
Det Insp John Morrison said: "These abhorrent individuals discharged a firearm in a busy residential area, showing complete and utter disregard for the safety of members of the public.
"We believe the attack was specifically targeted at the victim and additional patrols will be in the area to provide reassurance to the local community.
"The surrounding area would have been busy at the time and it is absolutely vital that anyone who saw or heard anything comes forward to assist with our inquiries."