Music legend Cher is on the verge of winning a bitter $1 million music royalty battle against Mary Bono, the widow of the Dark Lady’s sadly departed first hubby and singing partner, Sonny Bono!

“Cher’s got to be thrilled over this,” says Mark Bego, author of the Cher bio If You Believe. “She feels like she’s got hers, babe!”

At a court hearing, U.S. District Judge John Kronstadt announced he believed the 77-year-old singer is entitled to ongoing royalties from some of the biggest songs from her Sonny & Cher duo days — including “I Got You Babe” and “The Beat Goes On.”

He says the deal was outlined in the agreement from her 1974 divorce from Sonny, who died from blunt-force trauma in a freak 1998 ski accident at age 62.

The messy money melee began two years ago, when Mary, who oversees Sonny’s estate, stopped sharing royalties with Cher from the pop sensations’ hits. The two women were never close.

Insiders exclusively tell In Touch that Cher sees Mary as “a fake” who never loved Sonny the way she did — despite their bitter divorce. Ironically, Sonny’s surprise death brought a temporary truce between the ladies, but the battle resumed once died.

Sources tell In Touch that Cher claims that she still communicates with Sonny through a medium infuriate Mary, who they say believes the singer is seeking attention.

Court sources say all indications are Judge Kronstadt will soon issue a formal ruling in the Believe beauty’s favor.

Sonny and Cher married in 1964 and became one of the industry’s most successful performing duos. In addition to their many pop hits, they became huge TV stars with the CBS variety show The Sonny & Cher Comedy Hour, which ran from 1971 to 1974.

The duo shared a daughter, Chastity — who has since transitioned to male and is now known, at age 54, as Chaz.

Have a tip? Send it to us! Email In Touch at contact@intouchweekly.com.