Joshua Waring, son of former “Real Housewives of Orange County” cast member Lauri Peterson, is expected to strike a plea deal Friday that would spare him from serving any additional jail time in connection with a shooting in Costa Mesa that left a man wounded.

The deal is expected to result in Waring being sentenced to time already served and being released as early as Friday.

Waring was set to enter the plea agreement Thursday, but the matter was postponed for a day to enable the shooting victim to make a statement at the hearing.

Waring could face a possible life sentence if convicted at trial, which is set to begin next week.

It was unclear exactly what charge Waring will plea to. He is charged with three counts of attempted murder, along with a sentencing enhancement allegation of attempted premeditated murder, in the shooting of a then-35-year-old man outside a home in Costa Mesa on June 20, 2016. Two other people escaped injury in the drive-by attack.

“He will be pleading guilty to lesser felonies, and we appreciate the district attorney’s office taking another look at the case on the eve of trial and allowing us to come up with a disposition that is fair to everyone involved,” said Waring’s attorney, Joel Garson. “Josh is looking forward to getting out and restarting his life.”

Waring’s case has generated headlines since he was charged, not just because of his mother’s notoriety — she appeared in 50

episodes of Bravo’s popular reality show, mostly between 2006 and 2008 — but because of allegations of corruption in the prosecution of the case.

Waring also is a plaintiff in a federal lawsuit with multiple allegations, including denial of access to religious services for jail inmates, negligence in the care of pregnant inmates and improper access by law enforcement to confidential phone calls from inmates to their attorneys.

In 2018, Garson learned that some of his client’s phone calls from jail were improperly recorded and accessed by police.

In July 2018, the jail’s phone contractor, Global Tel Link Corp., acknowledged that a software update in January 2015 had dropped the phone numbers of dozens of lawyers from a do-not-record list. Hundreds of calls between inmates and attorneys were accessed by authorities.

Waring filed a motion seeking to have his charges dismissed due to outrageous governmental misconduct, but Orange County Superior Court Judge Jonathan Fish denied the motion, prompting an appeal, which also was denied.

Waring was attacked by another inmate Oct. 9, prompting him to allege that deputies were negligent in protecting him or were conspiring to get him hurt. The county denies that.

Jose Guzman is charged with slashing Waring with a blade while the two were supposed to be in isolation.

Waring also raised issues about a deputy firing pepper balls in his jail wing in June 2018. Orange County prosecutors reviewed the incident and declined to file charges, but they reopened the investigation when Waring raised the matter in a motion seeking to reduce his $1-million bail.

Ultimately, Waring agreed to drop the bail motion when county sheriff’s officials agreed to house him in Santa Ana’s jail. But Waring raised issues while in custody in Santa Ana about a lack of time out of his cell because he was being housed in isolation to protect him as a well-known inmate.

Waring accused Santa Ana jail guards of providing the wrong dosage of his medication to help wean him off a narcotics addiction and failing to take him for treatment of dental problems. Fish ordered the trip to the dentist.

When Santa Ana jail officials tried to cancel their contract with the county and ship Waring back to Orange County Jail, Waring objected and the judge blocked the move.

Support our coverage by becoming a digital subscriber.