SANTA ANA (CBSLA) — A Garden Grove man charged in a police stand-off in which he barricaded himself inside of a patrol car with an assault rifle pleaded not guilty in a Santa Ana courtroom Friday.

Stephen Matthews, 33, is charged with several felonies in connection with the shocking incident that happened in the back of a Garden Grove police car Wednesday.

READ MORE: 3 Children Stabbed To Death In Reseda Apartment; Mother Captured In Central California After Going On The Run

The incident was recorded on a dashcam. Gunfire can be heard from an AR-15 rifle.

Investigators say Matthews, a drug and alcohol recovery patient, fired the weapon from the back of the cruiser after gaining access to it through the screen that divides officers from suspects.

Investigators say Matthews was put in the police car and was awaiting transfer to a hospital. He wasn’t handcuffed due to mental health concerns.

READ MORE: Man in Riverside Barricades Himself Against Police After Shooting His Wife

When police shined their flashlights inside, they discovered he had one of their guns that had been locked in a rack in the front seat.

Matthews can be seen at one point holding the gun upside down and then clearing a round in the chamber. You see him talking to himself and fire a gunshot out of the windshield, later mumbling to himself he wouldn’t hurt anyone.

No one was injured and after three-and-a-half hours before a SWAT team managed to get Matthews out of the back of the police car.

He has pleaded not guilty to several charges including assault with a deadly weapon on a peace officer and a felon in possession of a gun.

MORE NEWS: Couple Reunited With Lost GoPro Camera After Four Years, Thanks To TikTok Users