Toronto police have arrested and charged a man and teen boy with attempted murder after a shooting outside a public library branch last month that critically injured another man.

The man, 20, and boy, 16, were arrested on Tuesday and were scheduled to appear in court on Wednesday. The victim, a 26-year-old man, suffered life-threatening injuries.

Police said in a news release on Wednesday that the victim was approached by a man in the area of Finch Avenue West and Tobermory Drive on Sept. 19 at about 7 p.m., when an argument ensued and became heated.

The teen boy intervened, produced a handgun, shot the victim once in the chest and fled the scene, police allege.

At the time, police said the victim made his way into the library to get help after the shooting. Paramedics arrived and rushed him to a trauma centre. The Toronto Public Library branch in that area is York Woods.

The shooting occurred outside a Toronto Public Library branch near Finch Avenue West and Tobermory Drive. (Keith Burgess/CBC)

Police were able to identify the man and teen boy.

According to police, officers from the West Command Gun Violence Suppression Unit obtained four search warrants, carried out searches and allege they found "distinctive clothing worn at the time of the shooting."

Officers also allege they found and seized a semi-automatic handgun and a large quantity of marijuana.

Both the man and boy are charged with:

Careless storage of a firearm.

Possession of a loaded firearm.

Possession of a restricted or prohibited firearm without holding a licence and registration certificate.

Possession of a restricted or prohibited firearm knowingly not holding a licence and registration certificate.

Discharged a firearm with intent to endanger life.

Two counts of possession for purpose Schedule II.

Proceeds of crime under.

The man was also charged with: accessory to indictable offence; two counts of possession of a firearm while prohibited; and failure to comply with probation.

Anyone with information is asked to contact police at 416-808-3100 or Crime Stoppers anonymously at 416-222-TIPS (8477).