MESA, Ariz. - The suspect who shot at officers early Saturday morning has been released from the hospital and booked into jail, according to police.

Police said 27-year-old Abel Manuel Lopez sped away when an officer tried to pull him over for expired registration.

The officer did not pursue, police said, but the police helicopter was able to follow the car and update ground officers on its location.

The car came to a stop near 2nd Street and Mesa Drive, where police say Lopez exited the car and ran through the Park Village apartment complex.

Police said the first arriving officer gave chase and cornered Lopez in a stairwell, where the officer told him to come out.

The suspect instead pulled a handgun and pointed it at the officer, prompting the officer to fire his duty weapon at Lopez, according to police.

Police said Lopez still did not comply and fired several rounds at the officer.

The officer called again for the suspect to surrender, but police said he instead leaned from behind the stairwell and pointed his gun at the officer.

Because of the threat, police said the officer fired one more round at Lopez, who then complained he was injured.

Police said Lopez then threw his gun in the officer's direction and stayed hidden in the stairwell.

A K9 was deployed when he refused to come out, police said.

The dog bit the suspect, allowing officers to take Lopez into custody.

Police said Lopez was taken to the hospital for a gunshot wound and dog bite injuries.

Officers examined the gun that Lopez threw and said he seems to have thrown it because it was jammed and would no longer fire.

No officers or other residents of the complex were injured in the exchange of gunfire.