BANGKOK — An influential former police officer walked free Wednesday after a court found him not guilty of resisting and assaulting the policemen who closed down his illegal market earlier this year.

Santhana Prayoonrat, formerly a lieutenant colonel, was acquitted on all counts by the Don Mueang Circuit Court, which said his confrontation with law enforcement did not escalate to a level punishable by law.

While prosecutors argued that Santhana resisted an on-duty officer and assaulted him by pointing a finger and shouting at a police general to leave the market, the court said Santhana’s gesture could not be considered harmful behavior.

“I came here with 99 percent confidence,” Santhana told reporters outside the court. “I was a police officer once. How would I not know how to show respect to a person in uniform?”

The 59 year old also said he would file charges of malfeasance against 18 officers for what he called unlawful harassment.

The confrontation took place when police and city officials moved this past May to dismantle Plaza Rimnam in the the Don Mueang New Market, which authorities said was squatting on public land.

Santhana was fired from the force in 2014 amid fraud allegations. His expulsion came after years of media reports accusing him of involvement with illicit businesses in the capital city.

An order signed by His Majesty the King in October stripped Santhana of his police rank and royal decorations.