According to police, around 2 a.m. officers attempted to pull Lopez over for expired registration.
Police say Lopez sped away from the officer, which prompted a police air unit to follow him to the area of 2nd Street and Hobson, where he exited his car and ran through an apartment complex.
As an officer arrived, he reportedly cornered Lopez in a stairwell and ordered him to come out.
Lopez then allegedly pulled out a gun and pointed it at the officer. The officer then fired his weapon at Lopez.
Police say Lopez did not listen to commands and fired several rounds at the officer.
After the exchange of gunfire, police say Lopez then leaned from behind the stairwell and again pointed his gun at the officer.
The officer then fired another round at Lopez who then reportedly complained of being injured and threw his gun in the direction of the officer, remaining in the stairwell.
A police K9 then encountered Lopez and bit him, allowing officers to take him into custody.
He was transported to the hospital for a gunshot wound and dog bite injuries, according to police.
Once officers examined the gun, it appeared Lopez had thrown the gun because it was jammed and could no longer fire, police said.
Lopez has been booked into jail on several charges including three counts of aggravated assault with a deadly weapon, a count of aggravated assault on a law enforcement officer, and a count of unlawful flight from law enforcement.