SACRAMENTO -- A Sacramento police officer was recovering after he was allegedly lured out of his patrol car and ambushed, reports CBS Sacramento.

Police say Juan Gomez, 21, beat the officer, while Jamaral Lee, 35, filmed the Monday morning attack.

Sacramento police spokesman Doug Morse said Gomez made up a story to get the officer, whose name has not been released, out of his car.

Get Breaking News Delivered to Your Inbox

"(Gomez) had told the officer that there was someone in the area with a gun. He immediately and violently attacked the officer," said Morse.

The officer, taken by surprise, was knocked to the ground, according to Morse.

"The attack continued when that individual actually jumped on that officer and continued to strike him in the face," Morse said.

While the attack was happening, police say Lee recorded it on his cellphone and encouraged the assailant, Gomez. Eventually nearby security guards and bystanders noticed what was happening, and helped stop the attack, according to Morse.

Police were called and both Gomez and Lee were arrested. Both suspects faces felony charges.