A Los Angeles man pleaded not guilty Friday to charges that he tried to kill two officers at the LAPD’s Harbor Station in San Pedro, including one who was pistol-whipped and another with whom he allegedly exchanged gunfire.

Jose Cerpa Guzman, 29, is charged with two counts each of attempted murder and assault with a semiautomatic firearm, along with one count each of second-degree robbery, evading and resisting an officer.

He could face a potential life prison sentence if convicted as charged, according to the Los Angeles County District Attorney’s Office.

Guzman walked inside the police station and got into a verbal altercation with an officer shortly before 10 p.m. Sept. 26, left the building, then returned and allegedly began attacking the officer. He grabbed the officer’s gun and struck him with it several times, according to the District Attorney’s Office.

Security video showed the suspect pistol-whipping the officer in the head multiple times with the officer’s own gun after he went out to meet with Guzman in the lobby of the station at 2175 John S Gibson Blvd. The suspect then pointed the weapon at the officer and ran out the door.

While Guzman was outside the station, shots were exchanged between the suspect and a second officer who arrived in the lobby, but no one was injured in the gunfire, according to the District Attorney’s Office.