A person was shot to death while allegedly attempting a robbery Friday morning in northwest Indiana.

Police responded about 7:30 a.m. to the home in the 6400 block of Woodward Avenue in Hammond, Indiana, where they found 31-year-old Darrell L. McGee Jr. inside the home with multiple gunshot wounds in his chest, according to a statement from Hammond police and the Lake County coroner’s office. McGee was pronounced dead at the scene.

Witnesses said McGee entered the home and announced the robbery while threatening them with a gun, according to authorities. He then forced the home’s occupants into the basement.

McGee did not see one occupant of the home, who got a handgun he keeps for self-defense and shot McGee when he exited the basement and entered the kitchen, authorities said.

After the shooting, police contacted Maywood Elementary School, which is about a block from the home, and advised them to keep children inside, police said. The school was later notified when the area was secure and all parties were in custody.

The coroner’s office said McGee, of Gary, Indiana, died from his gunshot wounds and his death was ruled a homicide.