Security footage obtained by NBCLA shows the struggle that occurred inside a Los Angeles police station on Saturday evening where a man is accused of pistol-whipping a veteran officer before shots were fired.

TEXAS CHEERLEADER TARGETED BY 10 STUDENTS WHO LED OFFICERS TO SWARM HER DORM WITH GUNS, FAMILY SAYS

According to police, a male, indentified as 29-year-old Jose Guzman, approached an unidentified officer in the lobby of Harbor Community Police Station in San Pedro, Calif., at around 10 p.m. Saturday. Guzman appears to fight the officer, and the officer appears to fall to the floor after apparently being punched in the face.

Security footage of the altercation shows Guzman apparently struggling with the officer before he manages to gain control of the officer's pistol. Guzman then apparently continues his assault by hitting the officer on the head with what appears to be the gun. The officer was cut and bleeding from the attack it appears.

Police said Guzman then stood up while pointing the gun at the officer before retreating towards the front door. After an exchange of gunfire with an on-duty watch commander and a short pursuit, police took Guzman into custody a few blocks away after police used "non-categorical use of force."

LA POLICE DETAIN, RELEASE DRIVER AFTER VEHICLE PLOWS INTO PRTESTERS; AT LEAST 1 INJURED: REPORT

Policed noted that Guzman sustained minor abrasions and was medically treated and released for booking. Authorities also recovered a loaded 9mm Berretta semi-automatic pistol from Guzman's vehicle.

Meanwhile, Los Angeles Fire Department paramedics responded to the scene and transported the officer to a local hospital where he was treated for non-life-threatening injuries and later released. The officer is recovering from minor injuries at home and the motive for the attack remains unclear.

"The complete investigation will be reviewed by the chief of police and the Board of Police Commissioners and the Office of the Inspector General to determine the thoroughness and accuracy of the investigation and whether the use of deadly force complied with LAPD's policies and procedures," authorities added in a statement. "Additionally, representatives from the Los Angeles County District Attorney's Office who responded to the scene will review the subsequent FID investigation; evidence collected and witness statements to determine if the force used by the officers was reasonable."

CLICK HERE TO GET THE FOX NEWS APP

The incident came exactly two weeks after two Los Angeles County Sheriff’s deputies were shot in the head in an "ambush" attack while sitting in a patrol car near a Compton Metro station. Both deputies underwent surgery and are recovering at home after being released from the hospital.

Fox News' Brie Stimson contributed to this report