Three people charged with killing a man in Wilkinsburg after tracking his movements for weeks pleaded guilty Thursday in Allegheny County Common Pleas Court.

Herbert Lee Walker III, 29, and Jeremiah Ligon, 27, of Penn Hills both pleaded guilty to third-degree murder and conspiracy for their roles in the death of Mager Rainey, 22, of Homewood. He was shot to death on Oct. 20, 2019.

As part of a plea agreement in the case, Walker was ordered by Allegheny County Common Pleas President Judge Susan Evashavik DiLucente to serve 15 to 37 years in prison.

Ligon will be sentenced on Nov. 26.

Kenya Harper, 30, was accused of providing one of the guns that killed Rainey. She pleaded guilty to aggravated assault and conspiracy and will be sentenced on Sept. 19.

According to prosecutors, Rainey was visiting a house near Rebecca Avenue and Jeannette Street that night when a red Nissan Titan pickup truck pulled up to the area and two people began firing.

Investigators recovered seven .45-caliber and 14 .40-caliber casings.

Rainey was killed, and two others were wounded.

Using video surveillance and license plate readers, detectives were able to track the pickup truck to a rental car location in Monroeville.

The vehicle had been rented by Harper.

When detectives searched her home a few days later, they recovered the .40-caliber gun in the rafters of the basement, said Assistant District Attorney Stephen Sliger. They later found that the gun matched another shooting in the Pittsburgh from July, he said.

Later in the investigation, the prosecutor continued, detectives learned that a tracking device had been placed on Rainey’s vehicle, and Ligon had an app on his phone that he used to follow Rainey’s movements.

Text messages between the two men from the weeks leading up to the shooting showed them tracking Rainey’s travels and talking about harming him.

In another message on Oct. 8, 2019, Walker directed Harper to rent the truck and buy guns, Sliger said.

Paula Reed Ward is a TribLive reporter covering federal and Allegheny County courts. She joined the Trib in 2019 after spending nearly 17 years at the Pittsburgh Post-Gazette, where she was part of a Pulitzer Prize-winning team. She is the author of “Death by Cyanide.” She can be reached at pward@triblive.com.