Philadelphia Police Department(PHILADELPHIA) — The AK-47 that killed a 2-year-old girl in her Philadelphia home may have been supplied by the man who allegedly shot and critically wounded an 11-month-old boy in a separate incident hours earlier, police said.

Nikolette Rivera was in her mother’s arms in her North Philadelphia home Sunday afternoon when bullets from an assault rifle ripped through her house, fatally shooting her in the head, according to Philadelphia police.

A man cleaning carpets in Nikolette’s home was shot in the abdomen and hospitalized “in critical, but stable condition,” police said. Nikolette’s mother suffered a gunshot to the arm and a graze wound to the head, police.

Freddie Perez, 30, was taken into custody on Tuesday on charges of murder of Nikolette and nine counts of attempted murder, police said.

On Thursday, 25-year-old Tayvon Thomas was arrested on charges including the murder of Nikolette and nine counts of attempted murder, police said on Friday.

“These charges stem from their criminal acts committed at both the scene of the triple shooting homicide… and the shooting incident which took place approximately eight minutes prior” at another address, Philadelphia police said at a Friday news conference.

“The motive for these shootings appears to be for control of narcotics territory and its distribution in the area,” police said.

On Thursday, 29-year-old Francisco Ortiz was arrested as the alleged “sole perpetrator” in the Saturday night shooting of an 11-month-old boy, Yazeem Jenkins.

“We believe that Francisco Ortiz supplied the AK-47 that was used to commit the homicide” at Nikolette’s home, police said Friday.

“It all revolves around drugs,” police added.

The little boy was shot four times, including in the head and neck, while he was in the back of a car in the Philadelphia neighborhood of Hunting Park.

A drug transaction that “went awry” is believed to have led to the shooting, police said.

Three adults were in the car, including the boy’s dad. Police believe he may have been the target.

Charges against Ortiz include attempted murder and aggravated assault, police said. Ortiz is also a “prime suspect” in a September domestic-related homicide, police said, but has not been charged.

Meanwhile, the 11-month-old is in “really really bad condition,” police said.

He has no chance for a full recovery and if he survives, he most likely will be a quadriplegic, police said Monday.

Copyright © 2019, ABC Radio. All rights reserved.