A man was shot and seriously injured early Tuesday morning during a robbery attempt in downtown Toronto.

Police got the call at 3:18 a.m. about reports of gunshots in the area of King St. W. and Portland St., said Toronto police Const. Allyson Douglas-Cook.

When police arrived on the scene, officers found a man believed to be in his 20s with a gunshot wound in the leg. Paramedics say he was rushed to a local hospital with serious but non-life-threatening injuries.

Douglas-Cook said three men who were not known to the victim attempted to rob him. One of the men pointed a firearm at the victim and demanded he hand over a chain he was wearing. In the ensuing struggle, the victim was shot in the leg. Following the shooting, the perpetrators fled the scene with a car, but collided with a TTC service truck shortly after.

The group then attempted to flee on foot but the officers were able to arrest them.

“There was a brief pursuit of the suspects who were then caught and arrested,” Douglas-Cook said. “The officers did recover a firearm.”

Police have arrested all three men, who are in their late 20s and 30s, and also recovered three firearms. Douglas-Cook said there is no indication the victim was targeted.

Correction – August 8, 2017: This article was edited from a previous version that said the shooting took place in the entertainment district.