The NYPD identified 20-year-old Pedro Felix as the man police shot and killed while he was allegedly stabbing his father — after police say he stabbed and killed his 8-year-old stepbrother on the Fourth of July.

Police said they responded to a 911 call at 147-25 94th Ave. in Queens shortly after 5 p.m. Thursday. Officials said they found Felix holding a knife to his father, who’d already been stabbed multiple times. Felix’s stepbrother, 8-year-old Jacob Lopez, was found stabbed to death and his stepmother had also been stabbed multiple times, police said.

Two officers entered the apartment and saw Felix holding his father at knifepoint. Police said that when Felix failed to respond to multiple requests to drop the knife, an officer shot him once in the torso. Felix was taken to the hospital and pronounced dead.

All of the family members lived at the same address, police confirmed Saturday.

The NYPD is still investigating what prompted the attacks.

The department said the father, 43, and stepmother, 30, were still in the hospital in stable condition.

Bahar Ostadan contributed reporting.