A murder conviction in a 2010 shooting at Anchorage's Dimond Center mall has been overturned, after an appeals court said the trial judge made a mistake in instructing jurors.

The Alaska Court of Appeals handed down its decision this week overturning Terence Gray's second-degree murder conviction in the Feb. 27, 2010 shooting of Edwing Matos.

The shooting revolved around a burglary of Matos' home, after which Matos found a Craigslist ad posted by Gray selling his stolen Sony PlayStation. Matos' cousin bought the video-game console, leading the two men to set up a meeting at the mall to return Matos' other goods. That confrontation ended with Gray opening fire.

Gray's defense team argued that the shooting was in self-defense, while state attorneys said Gray planned the shooting all along. Gray was found innocent of first-degree murder but guilty of second-degree murder, and sentenced to 40 years in prison.

The Court of Appeals agreed with Gray that Superior Court Judge Jack Smith should have instructed the jury about a "heat of passion" defense, based on testimony from Gray that Matos had visited his home before the meeting to threaten him at gunpoint. The encounter left Gray "shaken," and he went to meet Matos wearing a bulletproof vest and a disguise.

At the mall, Gray said he recognized Matos' cousin nearby. He said Matos also told him he had "other friends" nearby – shortly before Matos spoke with someone by phone and said, "I'm going to shoot this [expletive]."

"Gray observed a gun in Matos’s waistband, and he believed that Matos was going to shoot him. Gray testified that he felt that he had no choice but to shoot or be shot," the decision read. "On redirect [questioning], Gray explained that he was not calmly considering his options at the time of the shooting; rather, he simply reacted to the perceived danger."

The court rejected claims by Gray that Smith had failed to address improper arguments made by the prosecution during closing arguments, and erred by allowing gun-related photos Gray had taken as well as two firearms found beneath his bed at the time of his arrest to be considered as evidence.

This reversal of the conviction leaves prosecutors with two options. If Gray has been convicted with a heat-of-passion defense in his favor, he would have been convicted of manslaughter instead of second-degree murder. The state could ask the Superior Court to enter a conviction of manslaughter, or the state could prosecute Gray again on the original charges and attempt to convict him again.

Copyright 2019 KTVA. All rights reserved.