Updated

Video released Tuesday captured a dramatic scene inside an Arizona Walmart as police and a gun-toting suspect bolted toward the doors, dodging bullets.

The suspect -- apparently a trespasser -- had opened fire on the officers last April before police killed him, Fox 10 reported.

OFFICER'S 14-YEAR-OLD SON DIES IN THE HOSPITAL AFTER FOUND SHOT IN THE HEAD

A worker at the Walmart in Chandler called 911 on 24-year-old Mitchell Oakley, saying he'd trespassed at the store before, according to investigators.

Officers Joshua Pueblo and Daniel Colwell arrived at the scene before Oakley fired at them, police said, adding that one gunshot critically wounded Pueblo.

mitchell oakley

Mitchell Oakley in an undated photo. (Arizona Dept. of Corrections)

MAN ARMED WITH KNIFE SHOT TO DEATH BY NEW YORK POLICE

As the video released by police showed, Colwell raced after the gunman, with the officer firing his weapon as he slid on the floor. Oakley barged out the door, dropping what appeared to be a gun before he stumbled on the ground.

Police confirmed the officer killed the suspect. Colwell also suffered injuries in the gunfight, police said.

Both officers were wearing ballistic vests at the time, Detective Seth Tyler told the Arizona Republic.

Oakley had served a few months in prison for attempted aggravated assault and vehicle theft.

Chandler is a 30-minute drive southeast of Phoenix.

Click for more from Fox 10.