A Chicago man was shot to death Thursday night after he rushed to save his teenage niece from an assailant in her home, authorities said.

The killer sneaked through a window of the 17-year-old's bedroom at about 9 p.m., and she screamed for help as he sexually assaulted her, according to a police statement.

Man shot to death trying to help niece who was being sexually assaulted in Burnside https://t.co/ZoeIS4Z5aV pic.twitter.com/EmkVqh31o6 — NBC Chicago (@nbcchicago) November 8, 2019

The girl's 66-year-old uncle ran to help her but was shot in the head and back by the attacker, authorities said. He was rushed to University of Chicago Medical Center, where he died.

A suspect was taken into custody a short time later, but he had not been charged as of Friday morning, a police spokesman said.