Three balaclava-clad men armed with a gun and machetes or bats shot a man as he sat in a car at traffic lights in Leeds city centre.
The 23-year-old man was in a BMW in Burmantofts Street at 18:30 BST on Wednesday when the shooting happened.
He was treated for a minor shoulder injury at nearby St James’s Hospital and later arrested, said West Yorkshire Police.
He is in custody and detectives are appealing for information.
The man is being held on suspicion of possessing a firearm with intent to cause fear of violence.
Burmantofts Street is cordoned off for searches and forensic examination. The road closure is causing “significant disruption” to traffic and St James’s Hospital, police said.
A silver Mazda 3 forced its way through traffic and pulled alongside the BMW, near to the A64 flyover, said West Yorkshire Police.
Three black men got out of the Mazda, two were armed with machetes or bats and began attacking the vehicle before one of the three got out a handgun and fired at the car’s passenger,
The men left in the Mazda and it was later found burnt out in Roundhay, Leeds, the force said.
Det Insp Andy Farrell, said they believed it was a targeted attack.