A 4-year-old boy visiting his grandmother in Southwest Philadelphia died yesterday afternoon after being shot in the throat, police said.

The shooting happened in the grandmother's home on the 1900 block of South Salford Street, a typical block in this part of the city, with a narrow road and rowhouses on both sides. The boy, whose name was not released, lived with his parents, police said.

Police said shortly before 5 p.m. the boy's grandmother and great-grandmother, who also lives in the home, heard gunfire and found the boy in a second-floor bedroom.

The boy was taken to Children's Hospital of Philadelphia, where he was declared dead about 5:30 p.m.

Homicide detectives declined last night to speculate about who owned the firearm or how the boy got hold of it, saying their investigation had just begun.

Neighbors said the child, whom they identified as Deshawn Boyd, attended preschool at Bright Side Academy.

Last night, uniformed police officers and detectives were in the rowhouse, searching for clues as to what happened.

They reported finding the handgun but not its magazine. At one point, a Fire Department ladder unit was brought in to search rooftops in the area for the magazine.