A California billionaire and his gal pal won’t be serving time after forking over $1 million to settle drug possession charges, prosecutors said.

Broadcom co-founder Henry T. Nicholas III and Ashley Fargo entered a plea deal Wednesday that will require them to each donate $500,000 to local drug treatment organizations, news station KTNV reported.

The pair was busted at a Las Vegas Strip resort in August 2018 after a stash of drugs, including heroin, meth, methamphetamine, cocaine, mushrooms and ecstasy, was found in their hotel room at the Encore.

When Nicholas was locked out of his room, he called security and they discovered Fargo — the ex-wife of Brian Fargo, an heir to the Wells Fargo fortune — unresponsive with a semi-deflated balloon in her mouth, TMZ reported. She was revived with assistance from paramedics.

Nicholas and Fargo faced charges of trafficking heroin, cocaine, meth and ecstasy.

As part of their plea agreement, they will also both be required to undergo drug counseling and complete 250 hours of community service, prosecutors said.

“In addition to Mr. Nicholas and Ms. Fargo getting their own treatment, their substantial donations to local drug treatment programs will help hundreds in our community who suffer from substance abuse and addiction disorders,” Clark County District Attorney Steve Wolfson said to KTNV. “It is literally a game-changer for the programs receiving these funds, and the citizens they help every day.”

Nicholas — who is estimated to be worth $4 billion — released a statement after the case was dismissed.

“Dr. Nicholas and Ms. Fargo have always maintained their innocence, and today’s resolution allows them to put this matter behind them while making meaningful contributions to Las Vegas organizations focused on fighting the scourge of drug addiction,” his attorney, David Chesnoff, said in a statement. “In addition to the financial donations they have already made, Dr. Nicholas and Ms. Fargo are eager to begin their community service.”