It started at Palm and Ashlan Avenues around 11:30 pm on Sunday when Fresno County sheriff's deputies pulled over a driver with expired registration.
Deputies say they noticed drug-related items in the car and asked the man to get out of the vehicle. That's when the driver took off.
The deputies chased the suspect, who reached speeds up to 80 miles an hour.
The man crashed after his vehicle lost a tire.
Two deputies tried to take him into custody, but he fought back.
"He swung a black bag at one of (the deputies) and hit one of them in the head and had a loaded Glock gun in the bag that caused some injury to the deputy's eye," said Fresno County Sheriff's Sgt. Christian Lightner.
The deputy is expected to be OK. Officials are investigating the gun.
The driver was taken into custody and checked out by paramedics. He will face several felony evading charges.