ANNAPOLIS, Md. (AP) — A Maryland appeals court has overturned the conviction of a woman sentenced to life in prison for hiring a man to kill her husband at the family's gas station.

The court ruled Monday that Karla Porter deserves a new trial because she was entitled to a jury instruction on "imperfect self-defense" when she presented evidence that Ray Porter had abused her during their 24-year marriage, that his abuse escalated in the weeks before his killing in 2010.

The court said that despite hiring someone to kill her husband, Porter had presented sufficient evidence that she actually believed she was in "imminent or immediate" danger.

Prosecutors say Porter plotted to make it look like her husband was killed during a robbery. The gunman, Walter Bishop Jr., is serving life in prison.