The prostitution sting that ensnared billionaire Robert Kraft was doomed from the get-go because of a string of law enforcement missteps, according to court observers who’ve watched the case quickly unravel.

What began as authorities’ mission to bust criminal activity in massage parlors across Florida has turned into a monumental legal victory for Kraft and others charged with soliciting prostitution.

The defendants have won rulings in their favor, including a watershed moment this past week when the judge in the Kraft case prohibited prosecutors from using secretly recorded sex videos.