Patriots owner Robert Kraft has pleaded not guilty to two misdemeanor charges of soliciting prostitution. (Tim Bradbury/Getty Images)

A judge in South Florida ruled Monday that prosecutors can’t use video footage of Robert Kraft in a massage parlor, a victory for the New England Patriots owner. That footage appeared to be crucial to the case against Kraft, who faces two misdemeanor counts of soliciting prostitution.

Kraft’s attorneys are reportedly now expected to file a motion to dismiss the case, possibly as soon as Tuesday. Kraft, 77, issued a public apology in March but pleaded not guilty to the charges.

According to reports, his attorneys had argued that the installation by police in Jupiter, Fla., of hidden video cameras at the spa, under the direction of a search warrant, did not do enough to protect the privacy of innocent patrons. And Judge Leonard Hanser, of the 15th Judicial Circuit in Palm Beach County, agreed on the privacy issue.

Additionally, the judge ruled that any evidence obtained through a traffic stop of Kraft, conducted as he was leaving the spa Jan. 19, would be suppressed, as “the fruit of an unlawful search,” because the owner’s “identity was not known to law enforcement until he was stopped.”

“The fact that some totally innocent women and men had their entire lawful time spent in a massage room fully recorded and viewed intermittently by a detective-monitor is unacceptable,” he wrote in a 10-page opinion (via Deadspin).

Hanser also wrote: “The Court finds that the search warrant does not contain required minimization guidelines, and the minimization techniques employed in this case did not satisfy constitutional requirements. Consequently … all evidence against the Defendant obtained through and connection with the search warrant is suppressed.”

Kraft — who bought the Patriots in 1994 and has seen New England win six Super Bowls in 10 trips since then — was entangled in a multicounty investigation into several massage parlors. He was alleged to have visited a location in Jupiter and paid for a sex act in mid-January, then returned the next morning for the same reason before flying to Kansas City to watch his team play in the AFC championship game.

“I am truly sorry,” Kraft said in a written statement in March. “I know I have hurt and disappointed my family, my close friends, my co-workers, our fans and many others who rightfully hold me to a higher standard.”

It remains to be seen if Kraft receives any punishment from the NFL, which could conduct an investigation and make a determination independent of how the court proceedings play out.

Hanser ruled last month that — in the interest of ensuring a fair trial — the video would be withheld from the public, at least until a jury was sworn in, a plea agreement was reached or prosecutors dropped the case. Attorneys for the billionaire owner, per USA Today, are expected to use Monday’s ruling to argue that the video should continue to be kept under wraps.

Read more from The Post:

Unconcerned by limited experience, Redskins pledge patient approach with Dwayne Haskins

Cracks showing in Nats’ foundation, and Mike Rizzo may not have a fix

Kentucky Derby jockey suspended 15 days for his ride on disqualified Maximum Security