Police say bullets narrowly missed two young girls when gunshots rang out in their North York apartment building earlier this week.

On Monday evening, investigators say two nine-year-old girls were playing in the hallway of their apartment building near Finch Avenue and Don Mills Road when they were nearly struck by gunfire.

When officers arrived on scene, police found bullet holes in a door to one of the apartments and heard screams coming from inside the unit.

When they broke down the door to assist the person inside, investigators say they heard a person calling for officers in a back room of the apartment.

According to police, when they located the person, he was not in distress, as they had previously assumed.

Instead, police say they located one man armed with a gun.

Officers contained the man inside the room and when members of the Emergency Task Force arrived on scene, they apprehended the suspect.

Police say while officers waited for the ETF to arrive, the suspect threw a firearm and ammunition off the balcony.

A Norinco 320 Uzi 9mm and ammunition were recovered by officers.

Edris Ghulami, 25, has been charged in connection with the case.

He faces 14 charges including discharging a prohibited firearm, unlicenced possession of a prohibited firearm and four counts of attempted murder.