“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 and results from the lack of sufficient pre-monitoring written guidelines,” the judge wrote.

Because the video evidence was the basis for the police’s decision to stop Mr. Kraft and confirm his identity as he rode in a friend’s car, the evidence from the traffic stop was also thrown out.

“All information obtained through the stop is suppressed as the fruit of an unlawful search,” the judge wrote.

The next step would most likely be for Mr. Kraft’s lawyers to file a motion to dismiss the case. For now, the prosecutor in the case has left open the option of an appeal of Monday’s ruling. “We are reviewing the judge’s order at this point,” Michael B. Edmondson, a spokesman for the Palm Beach County prosecutor’s office, said in an email.

The case has brought international attention to the issue of human trafficking and tarnished one of the most powerful owners in sports. It also cast an unflattering light on the N.F.L. regarding the treatment of women. In recent years, the league has been embroiled in a host of domestic violence scandals. Cheerleaders have accused teams of exploiting them. Last year, Jerry Richardson, the former owner of the Carolina Panthers, was fined $2.75 million after an investigation confirmed claims that he sexually harassed employees for years.

Because he was charged as a first-time offender, Mr. Kraft, 77, was unlikely to face time in jail, and his record would have been expunged if he completed the terms of the plea deal in Palm Beach County, where he keeps a home at the famed luxury hotel, the Breakers.

While the case against Mr. Kraft hangs in the balance, he may still be penalized by the N.F.L.’s commissioner, Roger Goodell, who has broad authority to hold players, league executives and owners accountable for conduct he deems detrimental to the league. Those penalties can include fines of up to $500,000 and suspensions, based not just on the legal case against Mr. Kraft but also on the damage he did to the league’s reputation.