A California police officer is recovering from a brutal beating outside of a Sacramento hospital Monday, and investigators believe he was targeted because of his profession.

GomezLeeSacramento Police said Juan Gomez, 21, approached the officer in his patrol vehicle at Kaiser South Medical Center around 12:30 a.m. Monday and lured him out of the car by claiming there was a man with a gun in the area, the Sacramento Bee reports.

“As the officer stepped out of his car, Gomez immediately and violently assaulted him,” according to a police statement.

A punch to the face knocked the officer to the ground, where Gomez allegedly continued to attack him while repeatedly reaching for his gun.

“The attack continued when that individual actually jumped on that officer and continued to strike him in the face,” Sacramento Police spokesman Doug Morse told CBS Sacramento.

That’s when Jamaral Lee, 35, began recording the attack and encouraging Gomez, police allege.

The officer eventually managed to radio for help, and hospital security guards and other bystanders eventually intervened. Both Gomez and Lee were arrested and the officer was rushed into the hospital, according to the news site.

The officer received treatment for “significant” facial injuries. He was released and is currently recovering but cannot return to work because of the injuries, Fox 40 reports.

“An event like this is just not typical,” Morse told the site. “Although it is a testament to how unpredictable law enforcement can be. Not only unpredictable, but just how dangerous it can be. Any time an officer puts on the uniform and heads out to the street, we know it’s within the scope of our duty that we may be confronted by violent and dangerous individuals.”

And while Monday’s attack was especially violent, attacks on officers in general are becoming increasingly common.

“In 2011, there were 37 reported cases of violence against Sacramento police officers between January and early October,” Fox 40 reports. “This year, there have already been 61.”

Former Sacramento County Sheriff John McGinness told CBS Sacramento unprovoked violent attacks are “a very, very difficult thing to protect against” and they’re changing how officers approach certain situations.

McGinness pointed to a recent ambush of a Houston-area deputy who was shot recently while fueling his car, and similar incidents with the New York Police Department.

“We’re likely to see an era, at least for a while, in which law enforcement will have to approach overall general contact with the public differently,” he said.

The Sacramento attack also prompted a response from local leaders of the Black Lives Matter movement, who vehemently denounced the brutal beating, saying “attacks like this set back progress.”

“I could say to this individual and individuals that may think that what this young man did was justifiable that that doesn’t represent our community; it doesn’t represent change,” Pastor Les Simmons told CBS Sacramento, adding that the incident erodes trust the movement has built with the police department.

“There’s been a real effort both by the community and by law enforcement and the city to really have a conversation that moves our community to a better place,” he said.

Gomez was charged with numerous felonies, including suspicion of resisting arrest and battery on a peace officer, while Lee was booked on suspicion of assault and battery on a police officer, advocating injury to a police officer and resisting arrest, the Sacramento Bee reports.