A former Miami police officer pleaded innocent to allegations that he exposed himself to a local convenience store worker.

James Gambill Jr. 48, made his first appearance in court Wednesday after being charged with one count of indecent exposure.

Gambill is accused of masturbating in the presence of a Miami woman while sitting in his patrol car on the night of June 4.

Miami Police Chief Gary Anderson called the action unacceptable and said his department would not tolerate behavior of that nature.

“Everyone in the department is in shock, Anderson said. “This is completely out of character for the officer and, once it sets in, it is like a kick in the stomach.

A six-week investigation by the Oklahoma State Bureau of Investigation led to Gambill's arrest on July 24. During the course of the investigation, OSBI agents recorded conversations between Gambill and the alleged victim.

In one conversation, Gambill admitted that he was wearing no pants when he drove to the convenience store on June 4. He also admitted it was not the first time he had drove his patrol car without pants on.

Gambill resigned from the police department on July 26, two days after charges were filed against him.