Two Norristown teens who attempted to rob a man late Friday died after their intended victim shot them with a gun he was licensed to carry, prosecutors said Saturday.

The shooting occurred about 8 p.m., as the man was walking to his car from a home nearby on Warren Street, according to a statement from Montgomery County District Attorney Kevin Steele. Steele did not release the man’s name because no criminal charges have been filed in the case.

Detectives determined that a fight broke out after one of the two 17-year-old males pulled a gun on the man. During the scuffle, the man shot both teens, Steele said.

The man called police and attempted to give medical aid to the teens, but both were pronounced dead at the scene. Officers found an illegal ghost gun — a firearm assembled from a kit that lacks a traceable serial number — with an extended 30-round magazine nearby, authorities said.

Steele declined to release the names of the teens, saying there is “a lot of work” to be done in the investigation.