A teenager shot and killed his friend as the two were examining a gun inside a Long Island home Friday afternoon, police say.

Nefi Reyes and his friend, a high school student identified as Wilson Gil-Torres, were at Reyes' apartment in Copiague, handling Reyes' handgun, according to Suffolk police. Reyes pointed the gun toward his friend, and it discharged, hitting Gil-Torres in the torso.

Reyes, 18, called police, and emergency responders took Gil-Torres, also 18 and of Copiague, to Good Samaritan Hospital Medical Center in West Islip, where he was pronounced dead.

A third friend was also at the apartment on Great Neck Road, and the group had been near the front door when the gun was fired.

The shooting happened about two and a half blocks south of Copiague Middle School and about a quarter-mile west of Walter G. O'Connell Copiague High School.

Reyes was arrested and charged with second-degree manslaughter. He was being held overnight and is scheduled to be arraigned at First District Court in Central Islip on Saturday.

Attorney information wasn't immediately available.