Harvey Weinstein and his high-powered criminal defense lawyer Ben Brafman have officially parted ways.

“Mr. Weinstein has authorized Mr. Brafman to formally notify Judge Burke of his decision to withdraw as counsel for Mr. Weinstein in connection with all legal matters currently pending,” Weinstein spokesman Juda Engelmayer said in a statement.

Brafman must remain on the sex-assault case until Justice James Burke signs off on the separation.

“Both parties have agreed to part ways amicably, and Mr. Brafman has agreed to cooperate fully with new counsel for Mr. Weinstein so as to ensure an orderly transition,” the statement continues.

The news comes just 3 1/2 months before the fallen film mogul is slated to go to trial May 6, and his team is feverishly looking for a replacement.

Weinstein faces allegations he forcibly performed oral sex on production assistant Mimi Haleyi in 2006 and raped a longtime lover in a Manhattan hotel in 2013.

JENNIFER LAWRENCE RESPONSE TO ALLEGED HARVEY WEINSTEIN CLAIM OF SEXUAL ENCOUNTER: 'ANOTHER EXAMPLE OF ... PREDATORY TACTICS AND LIES'

Harvey Weinstein and attorney Benjamin Brafman arrive at State Supreme Court, June 5, 2018 in New York City.

Harvey Weinstein and attorney Benjamin Brafman arrive at State Supreme Court, June 5, 2018 in New York City. (Drew Angerer/Getty Images)

HARVEY WEINSTEIN SEXUAL ASSAULT CASE WILL MOVE FORWARD, JUDGE SAYS 

In a major coup, Brafman won a motion to dismiss the count that related to a third accuser, Lucia Evans, who was once considered the strongest part of the prosecution’s case.

The break-up statement says that “Weinstein praised Mr. Brafman for his legal work” and that Brafman “personally wished Mr. Weinstein “the best of luck.”

The Post exclusively reported Sunday that the pair were on the verge of parting ways after they had an explosive fight over Weinstein trying to beef up the defense team in advance of trial without Brafman’s blessing.

The producer made overtures to attorneys Isabelle Kirschner and Susan Necheles, who both declined to comment. He also discussed hiring former sex-crimes prosecutor Linda Fairstein as a consultant.

Screaming matches between the pervy producer and his lawyer were routine — but the latest row was the final straw for Brafman, who exclusively told The Post he was withdrawing from the case on the same day Esquire released online a 7,500-word profile on him.

Esquire said it pushed up the story’s publication because of The Post’s expose.

The article quotes Brafman saying he didn’t mind that Weinstein solicited advice from other lawyers.

“Harvey is the type of guy who gets a second opinion on his tuna salad,” he said. Brafman added that Weinstein is “a nice guy, sometimes.”

This article originally appeared in Page Six