Pennsylvania police have arrested a man in the death of a child killed in a drive-by shooting.

Freddie Perez, 30, was arrested Tuesday. A shooter armed with an assault rifle fired into a North Philadelphia home around 2:30 p.m. Sunday, killing Nikoletta Rivera, 2.

The shooting occurred as Nikoletta was home with her mother, grandmother, other local children, and a carpet cleaner. Multiple shots ripped through the house as the elder Rivera attempted to shield the toddler, who was shot in the head.

Her mother and the cleaner were wounded.

KYW, Philadelphia, reported Perez confessed to his involvement but was believed to have acted with an accomplice. The report also said the shooting was connected to Nikoletta’s father, who was not home at the time. Acting Police Commissioner Christine Coulter said investigators suspected a drug dispute was involved.

Perez also was suspected in another shooting earlier in the day. He was charged with murder, attempted murder, violation of uniform firearms act and criminal conspiracy.

A second suspect, whose name was not released, also was arrested on unrelated charges.

Nikoletta was the second child shot during the weekend in Philadelphia. An 11-year-old boy was shot in the neck and back while sitting in the back of a car on Saturday. He was rushed to a hospital and remained in critical condition Thursday. Doctors said he'd likely be a quadriplegic if he recovers.

Police Car
In this photo, police cars sit on Main Street in Dallas, Texas, on July 7, 2016. Laura Buckman/AFP/Getty Images