A Portland, Ore. man who stripped naked before a flight to Silicon Valley to protest a TSA security screening at Portland International Airport was found not guilty Wednesday of a misdemeanor charge of indecent exposure.

A judge in Oregon ruled that John Brennan’s act of removing his clothing on April 17 in protest of the security screening was an act of protest and protected speech.

Brennan, 50, was arrested April 17 on suspicion of indecent exposure and disorderly conduct after removing his clothes to prove that even though he had tested positive for nitrates on his clothing he wasn’t carrying explosives.

Brennan was in line at 5:35 p.m. for an Alaska Airlines flight to San Jose when he got into his birthday suit “as a form of protest against TSA screeners who he felt were harassing him,” according to a police incident report obtained by The (Portland) Oregonian newspaper.

However, Brennan previously told this newspaper he did not feel harassed by the TSA workers; instead, he was protesting the pat-down process.

“They are just doing their job and as a citizen of the U.S. I’m doing my job to protect my constitutional rights to privacy, ” Brennan, a Pacific Grove native, said in a telephone interview with this newspaper. “The TSA had already violated my privacy by doing a pat-down and being pulled out of the line. It’s stripping me of any dignity.

The indecent exposure ordinance states: “It is unlawful for any person to expose his or her genitalia while in a public place, if the public place is open or available to persons of the opposite sex.” However, a prior Oregon Court of Appeals decision effectively limits the ordinance to prohibit only public nudity that is “not intended as a protected symbolic or communicative act.”

Brennan said he had declined to walk through a new scanning device at the airport. So Transportation Security Administration workers patted him down, put on gloves and wiped his clothing to test for explosive. He said he tested positive for nitrates, which he knew was an explosive ingredient because of the 1995 Oklahoma City bombing.

Brennan said the Oregon state Supreme Court has ruled that nudity is protected speech, and he disrobed with the idea that he was not breaking any laws. Brennan figured he’d be allowed to board his flight after proving he was not carrying a bomb.

“I know that public nudity is one of my forms of protest, ” Brennan said in April. “And I carry that in my back pocket. That’s how I have political speech. It gets people’s attention.”

Brennan said he was asked several times by screeners to not remove his clothes, and then to get dressed. When police arrived, he was again asked to get dressed.

Brennan said he refused.

“I stuck by my guns, ” he said.

According to Brennan’s social media sites, he provides clients “a broad base of technology skills and a high level of customer service to solve problems and increase independence.”

Brennan said he has one major Silicon Valley client, but declined to name the company.

Contact Mark Gomez at 408-920-5869. Follow him on Twitter @MarkMgomez