The jury in the Jodi Arias case tasked with deciding whether she should be sentenced to life in prison or death for killing her lover nearly seven years ago was unable to agree on terms of sentencing Thursday, removing the possibility of a death sentence.

The judge declared a mistrial and will sentence Arias to either life in prison or a life term with the possibility of release after 25 years.

It marked the second time a jury has deadlocked on her punishment -- a disappointment for prosecutors who argued for the death penalty during the nearly seven-year legal battle against Arias.

Arias was convicted of murder in 2013 after a lengthy trial that became a sensation with its tawdry revelations about her relationship with victim Travis Alexander.

The victim's sister, Samantha Alexander, sobbed in court while the decision was announced.

The jurors deliberated for 26.5 hours over a five-day span. Earlier this week, Arias' attorneys said jurors were at an impasse, but the judge denied a mistrial request. A verdict does not rule out the possibility of a hung jury. 

Arias stabbed and slashed Alexander nearly 30 times, slit his throat so deeply that she nearly decapitated him, and shot him in the forehead. She left his body in his shower at his suburban Phoenix home where friends found him about five days later.

She initially denied having anything to do with the killing. She later admitted that she killed Alexander but claimed it was self-defense after he attacked her. Prosecutors said it was premeditated murder carried out in a jealous rage after he wanted to end their affair and planned a trip to Mexico with another woman.

That jury deadlocked on her punishment, prompting the sentencing retrial that began in October.

Chris Hughes, a friend of Alexander, told KPHO that a hung jury would be frustrating.

"My personal opinion is that she earned the death penalty," Hughes said. "I would be OK with life in prison, if she never gets out again, but she deserves the life of a death row inmate."

The day she was convicted of murder, Arias gave a jailhouse interview with a local Fox reporter in which she said she'd rather have the death penalty. "I believe death is the ultimate freedom," she said.

The Associated Press contributed to this report