RIVERTON, Wyo. (AP) — A Riverton man has been released from prison after the Wyoming Supreme Court overturned his first-degree murder conviction in the 2010 shooting death of another man.

The Associated Press reports Gabriel Drennen was released from the Wyoming State Penitentiary on Thursday, a day after prosecutors dropped all charges against him in the May 2010 killing of 29-year-old Leroy Hoster.

The court ruled it was improper for prosecutors to tell the jury that state law always prohibits the shooting of an unarmed man. The ruling states it's up to the jury to decide whether the shooting was justified.

Drennen, who was serving a life sentence, has said he feared for his life when Hoster threatened to kill him and pushed him over a fence, and he shot the man in self-defense.