A Vallejo police officer's decision to use force against a man allegedly acting erratically has generated an investigation and sparked public outcry.

The violent episode, which was caught on camera outside a gas station in the Country Club Crest neighborhood, began Friday afternoon when a clerk called the police to complain about a man who was threatening people and transforming his fingers into the shape of a gun, according to employees at the gas station.

Footage of the confrontation showed the officer pin the man to the ground before punching him and hitting him with what appears to be a flashlight.

Another officer then arrived to help subdue the man. The first officer hit the man three more times with the flashlight before the video ended.

Frustrated witnesses could be heard voicing their concerns with the officer's actions, and one person could be heard yelling "police brutality."

Some Vallejo residents echoed that sentiment.

"Absolutely disgusting that someone would do that to a human being," Jonathan Seixas said.

Others suggest the officer's actions may have been justified.

"I was scared, like, what if (the man) really has a gun on him?" one of the gas station clerks said. "And what if he pulls out a gun and starts shooting people?"

The clerk added that the officer regularly helped her and customers in the past.

"I would never expect (the officer) to react like that," the clerk said. "I would have never expected him to be that kind of cop."

The identities of the officer and the man, who was taken into custody for evading police and for being under the influence, have yet to be released, police said.

The officer will remain on leave until a thorough investigation is completed, according to police.

"It's important that no one make any assumptions without having all the available facts," the Vallejo Police Department said in a statement. "Just like anyone else, officers are innocent until proven guilty."