SACRAMENTO (CBS13) – Police are saying that a man attacked two officers early Wednesday morning – including a Sacramento Police K9.

According to the Sacramento Police Department, the incident started as a routine traffic stop near Haggin Avenue and Northgate Boulevard around 12:45 a.m. Police say that the driver of the car – 23-year-old Amir Ricks – was about to be detained when he allegedly attacked the arresting officer and ran from the scene.

READ MORE: Monday's Show Info (5/23/22)

A perimeter was quickly set up as officers searched for the suspect. Eventually, a K9 officer found Ricks hiding in a shed. The K9 then attacked by Ricks, police say, forcing the dog’s handler to intervene.

READ MORE: Firefighting Agencies Prep For Intense Fire Conditions

Ricks was eventually arrested and booked at Sacramento County Jail on assaulting an officer, assaulting a police animal and weapons charges. The officer who first tried to arrest Ricks suffered minor injuries in the attack.

Police say a search of the area uncovered a loaded handgun allegedly belonging to Ricks.

MORE NEWS: 1 Taken To Hospital In Elk Grove Shooting

Ricks is being held at Sacramento County Jail on $30,000 bail.