One suspect was killed and a second wounded in a home-invasion robbery early Monday in Northeast Philadelphia’s Mayfair section, police said.

Homicide Capt. Jason Smith said at a news conference that two men, ages 23 and 24, wore masks while forcing their way into a rowhouse on the 7100 block of Walker Street about 4:15 a.m., apparently looking to steal drugs.

After taking a cellphone from a 9-year-old boy’s bedroom, Smith said, the men went into another bedroom, put a gun to the head of a 33-year-old woman, and demanded cash. During the robbery, Smith said, someone with a gun — possibly the woman’s boyfriend — came into the room and started shooting at the would-be robbers.

Smith did not identify the person who fired the gun, and said investigators were not sure where he had been before he opened fire.

The 23-year-old robbery suspect was struck in the back before jumping out a second-floor window, Smith said. Officers who responded to the scene found the man in the yard and took him to Jefferson-Torresdale Hospital, where he was pronounced dead at 5:01 a.m.

Smith did not identify the man pending family notification.

Police believe the second suspect, Elvin Laureano-Ubiera, 24, ran down the stairs and out of the house. He later arrived at Nazareth Hospital in a private vehicle with gunshot wounds to the left arm, police said. Smith said Laureano-Ubiera was in stable condition.

On Friday, police announced that Laureano-Ubiera had been charged with murder, robbery, and related counts for allegedly helping to initiate the crime that led to the fatal shooting.

Smith said it was unlikely that the man who fired the gun would face murder charges, adding that the investigation remained open.