Prosecutors in Prince George’s County got a major boost Tuesday in their effort to bring to trial a man accused of ordering the execution of a murder witness from inside the county’s jail.

A girlfriend of the accused man, Brian Mayhew, pleaded guilty to conspiracy to retaliate against Nicoh Mayhew for his planned court testimony.

Nicoh Mayhew was cooperating with prosecutors late last year and was expected to be the state’s star witness in January in a ­double-murder case against Brian Mayhew, his nephew.

A mistake by a county corrections officer last fall, however, allowed the two Mayhews to come face to face in a jail visiting booth.

During that encounter, prosecutors say, Brian Mayhew confronted his uncle about his impending court testimony. Weeks later, they say, recorded phone calls from jail show Brian Mayhew ordered the killing of his uncle.

Nicoh Mayhew was ambushed and shot repeatedly Dec. 19 while holding his 2-year-old son. The toddler survived, but the killing of Mayhew drew attention to the county’s history of witness intimidation.

On Tuesday, an Upper Marlboro woman pleaded guilty to supplying Brian Mayhew with information about the type of vehicle that his uncle would be riding in and his expected travel on the day he was killed.

In court filings, prosecutors have alleged that Brian Mayhew spoke in code to provide that information to two men who carried out the murder. The time period was called “9-11,” and the attackers were to look for a “white girl named Kia,” Brian Mayhew allegedly said in a recorded call the day before the attack.

Nicoh Mayhew’s girlfriend drove a white Kia on the day of the killing, which occurred at 9:54 a.m.

Under the plea agreement entered Tuesday, the woman will testify against Brian Mayhew as well as a co-conspirator in a trial that is expected to begin in the spring. She faces up to 20 years in prison, but prosecutors will make a recommendation on her sentence after her testimony is complete, said John Erzen, a spokesman for Prince George’s State’s Attorney Angela Alsobrooks.

The Washington Post is not naming the woman because authorities said they fear for her safety. The woman is in jail and presumably safe, they said. But Erzen said it is possible that a judge could grant her parole before the trial.

An attorney for the woman did not return phone calls. John McKenna, an attorney for Brian Mayhew, declined to comment.