The shooter, who has yet to be identified, died of an apparent self-inflicted wound before officers arrived on the scene in the city of Erie on Friday, Erie Police Chief Rick Lorah said.
"Some scenes stay with you long after you leave them. This is one of those tragic scenes," Lorah said.
Police have yet to establish a motive.
Eight of the nine who died in the shooting on Friday were family members, and one was a family friend, Lorah said.
After the shooter entered the home, he came out of the house and shot two women who appeared "distressed" and were pacing back and forth seeking help from neighbours.
Police arrived to find the two women dead outside. After deploying a drone and robot, they went inside and found the bodies of a five-year-old boy; a one-year-old girl on the first floor; two more women and two young men in a stairwell; and the shooter on the second floor.
"Out of respect for the victims and the families, I will not discuss the details of what our officers encountered inside that home," the chief said at a news conference.
"But I want our community to understand the gravity of what happened and the profound impact this tragedy has had on those involved and on our community as a whole."
Erie Mayor Daria Devlin said the police department "arrived at a horrific scene, faced unimaginable circumstances, and carried out their duties with courage and professionalism".
"They too are members of this community, and they too will carry the weight of what happened last night," she said.
Earlier, Pennsylvania Governor Josh Shapiro said in a statement on X that he had spoken with Mayor Devlin and had offered support following "the tragic mass shooting."