A state appeals court Friday overturned a life sentence for a man who in 2005 shot and killed a Vineland pharmacist who authorities said he had been stalking for weeks.

A three-judge panel of the Appellate Division of Superior Court ruled that the prosecution used contradictory statements and misstated the law to counter Steven Wright’s insanity defense during his 2010 trial.

That action resulted in the improper, subsequent rejection of Wright’s attempt to have his sentence, which included a no-parole stipulation, overturned, the judges ruled. The rejection marked a “manifest injustice,” they found.

The justices ordered that Wright must be resentenced. No resentencing date is yet set, Cumberland County Prosecutor Jennifer Webb-McRae said in a statement.

Webb-McRae said in the statement that Wright faces 30 years in state prison with a 30-year period of parole ineligibility. He could also be sentenced to life in prison, with the requirement that he serve 85 percent of that penalty under the state’s No Early Release Act, the statement reads.

While the justices overturned the sentence, they also upheld Wright’s conviction on charges of murder, possession of a weapon for an unlawful purpose and unlawful possession of a weapon. Wright remains in New Jersey State Prison in Trenton, state Department of Corrections records show.

Wright was convicted of the shooting death of 37-year-old Carol Ann Bradford in a Vineland ShopRite on Sept. 20, 2005. Bradford was killed as she left her pharmacist job at the supermarket that evening.

Authorities said Wright emptied two .38.-caliber revolvers as he shot at Bradford in the supermarket’s lobby. She fell to the ground next to a display of floral arrangements after being shot multiple times in the chest.

Authorities said that Wright was obsessed with Bradford and may have stalked her for weeks. They said they found a journal at Wright’s home that outlined Bradford’s work schedule and the kind of car she drove.

According to the appellate court ruling, the prosecution tried to counter Wright’s insanity defense by contending that Wright “acted with a purpose.” The prosecution then “pirouetted” during the penalty phase of the trial and argued that Wright acted with “depravity of mind,” the ruling continues.

“In light of the about face, and because the prosecutor also misstated the relevant law,” Wright’s subsequent motion to have his sentence set aside “should have been granted,” the justices ruled.

“We are satisfied that the denial of the motion resulted in a manifest injustice,” they wrote.

Contact Thomas Barlas: