Scottsdale police are investigating an officer-involved shooting at Fashion Square Mall that happened Sunday.

Police said just before 5 p.m. an off-duty Scottsdale officer responded to a report by a loss prevention officer of a suspicious person inside one of the stores.

It was believed the person had been shoplifting due to 'erratic behavior,' according to police.

The officer caught up with the suspect on the third floor of a parking garage on the north side of the mall between Scottsdale Road and Goldwater Boulevard.

Police say as the officer approached, 51-year-old Abel Martinez turned toward the officer and started to raise a gun.

At that time the officer fired at Martinez, killing him.

"As we're leaving, we hear Pop! Pop!," said witness Matthew Lewis, who told ABC15 he was trying to leave the parking garage with his wife and two kids when he saw the Scottsdale police officer open fire a short distance away.

Lewis says he saw both the officer and the suspect with a gun.

"We were thinking, 'what are we going to do with our kids?" Lewis said. "It smelled like fireworks, it was super smokey, very intense, so we grabbed our kids, we ran inside as we just heard continued gunfire."

Lewis thinks the officer did what was necessary.

"My wife and I believe that the officer most likely acted in self-defense," he said. "We believe on the side of he was protecting us and we're glad that he was there."

Authorities said no officers received any injuries.

Police say a loaded semi-automatic handgun and several shoplifted items were in the Martinez's possession at the time of the shooting.

Police say Martinez has an extensive criminal background including arrests for several drug offenses, theft, and robbery. He had a current arrest warrant for drug offenses and was a prohibited possessor.

Off-duty Scottsdale officers can be hired through the department by businesses or other entities, such as Fashion Square Mall, to work as security. Those hired work in full uniform and operate with full police authority, officials explained.

The off-duty officer involved in the shooting was working in that capacity at the time and has been placed on paid administrative leave while detectives investigate.