PINELLAS COUNTY, Fla. — A Seminole man who was facing life in prison for child porn charges is going to walk free Friday.

A Pinellas County judge ruled that deputies and prosecutors violated his fourth amendment rights and tossed out all the evidence in the case.

Sixty-three-year-old James Rybicki was charged with child porn, video voyeurism and lewd and lascivious molestation.

Pinellas deputies in 2016 executed a search warrant at a Seminole home and found a hidden camera that captured video of a 10-year-old neighborhood girl trying on bikinis.

Deputies said they also found photos that Rybicki took of that girl's private parts.

Earlier this month, Judge William Burgess tossed all that evidence out because he found the detective and prosecutor misled another judge to get the search warrant.

Burgess wrote that the supporting affidavit contained omissions and false statements that were done knowingly and intentionally, or with reckless disregard for the truth.

Rybicki's defense attorney, Lucas Fleming, says his client will walk out of court on Friday a free man.

The attorney says there is no doubt that deputies and the State Attorney's Office violated Rybicki's fourth amendment right, which protects against unreasonable searches and seizures.

"It was like, 'We think you have something, we're going to find another way to get in there to get it and we think that based on kind of the way these cases are handled, we're going to be OK doing that.' And the judge says 'You're not OK doing that. You cannot circumvent the fourth amendment to get into somebody's house.'"

The attorney says the outcome of this case is incredibly rare. It is the first time he has seen a Pinellas judge suppress a search warrant.