Shocking surveillance footage has revealed the moment a gunman opened fire on police officers after luring them to a Arizona Walmart for an ambush.

Chandler cops Joshua Pueblo and Daniel Colwell strolled into the store in April to deal with what they thought would be a straightforward case of trespassing.

But as they approached Mitchell Oakley in a McDonald's inside the supermarket, shoppers were sent sprawling as bullets were sprayed, hitting both cops.

Pueblo was shot in the face and his colleague Colwell was hit with two bullets from close range which knocked him to the ground.

CCTV footage shows the moment Colwell reaches for his gun as he is sliding backwards on the floor and fires back at the convicted felon.

As Oakley attempts his getaway, he drops his weapon outside the store.

He tries to go back for it, but is shot dead by the injured Colwell.

The clip also captures Pueblo escaping the melee leaving behind a trail of blood after being shot in the face.

Officer Joshua Pueblo remains on medical leave while recovering from gunshot wounds to the face and arm.

Mitchell Oakley, left in the red top, shoots officers Pueblo - who can be seen scrambling away from the scene having been hit in the face - and Colwell who is sliding backwards

The officers stroll into the Walmart in Arizona expecting to deal with a routine call

Diving for cover: Officer Colwell dramatically jumps out of the way as Oakley opens fire

Instinctive: He barrel rolls mid-dive to ensure he is in a position to return fire during the April shooting despite having been shot twice by Oakley

Fatal mistake: Oakley attempts to flee with his gun in his right hand while Officer Colwell is seen on the left taking aim

Final seconds: Oakley manages to make it outside into the forecourt of the Walmart store but is shot dead seconds later by Officer Colwell

Response: Officer Colwell fires the fatal shots that killed Mitchell Oakley just seconds after he opened fire from the McDoanld's restaurant inside

Heroes: Officers Daniel Colwell (left) and Joshua Pueblo (right) responded to the shooting at Walmart in April

Shooter: Mitchell Oakley was shot dead by cops at Walmart after he opened fire and injured two officers in April

Police were called around 6.30am regarding a trespasser at the store, said Chandler police spokesman Seth Tyler.

The officers encountered the unidentified male suspect at the front of the store, just past the greeters' area.

According to witnesses, the first officer entered the store and was fired upon immediately by the suspect, Tyler said.

The second officer, who was in close proximity, was also shot but was able to return fire.

Chandler police spokesman Seth Tyler stands behind crime tape at the scene of a police-involved shooting at a Walmart store on Saturday

'I guess you can call it what you want. It sounds like an ambush to me,' Tyler said.

Cynthia Ayala was on the other side of the store in a dressing room when she heard the gunfire but didn't at first realize what she heard.

'I thought it was like pallets falling. I never thought it would be gunshots,' Ayala said.

She said the shots came one after another and then it became apparent they were bullets.

'I was just really scared as to where they would fall,' Ayala said.