A Pennsylvania jury will decide on life or death for a man who pleaded guilty to killing and dismembering his girlfriend's 14-year-old daughter in what prosecutors are calling a rape-murder fantasy he and the teen's mother shared.

Jacob Sullivan, 46, pleaded guilty to all charges last month in a case that raised questions about the child welfare system's failure to protect Grace Packer, who spent years in an abusive home before she was sexually violated, drugged and then, finally, strangled in the attic of a suburban Philadelphia home in 2016.

Prosecutors have said that Grace's adoptive mother, Sara Packer, watched Sullivan act out a rape-murder fantasy they shared. Sara Packer, a former foster parent and county adoptions supervisor, has agreed to plead guilty in exchange for a life sentence and could be called to testify at the penalty phase of Sullivan's trial, which opened Friday outside Philadelphia.

Sullivan's attorneys plan to argue that Sara Packer masterminded the plot against Grace , and that Sullivan should be sentenced to life.

Packer and her husband at the time, David Packer, adopted Grace and her brother in 2007. The couple cared for dozens of foster children before David Packer was arrested in 2010 and sent to prison for sexually assaulting Grace and a 15-year-old foster daughter at their home in Allentown, about an hour north of Philadelphia. Sara Packer lost her job as a Northampton County adoptions supervisor in 2010 and was barred from taking in any more foster children.

The Pennsylvania Department of Human Services launched an investigation after Grace Packer's murder but its findings have not been made public.

Sullivan beat and raped Grace, and she was tied up, drugged and left to die in a sweltering attic, authorities have said. Returning the next day and finding Grace was still alive, Sullivan strangled her, court documents said. The couple stored her body in cat litter for months, then hacked it up and dumped it in a remote area where hunters found it in October 2016, police have said.

Sullivan entered his guilty plea as jury selection was about to get underway. The jury that will decide his sentence must be unanimous in order to impose the death penalty; otherwise Sullivan will get life without parole.

Democratic Gov. Tom Wolf declared a moratorium on capital punishment shortly after taking office in 2015. Pennsylvania last carried out an execution in 1999.