Margaret Sanchez on Monday confessed to her role in the 2012 killing and dismemberment of Bourbon Street dancer Jaren Lockhart in a deal that will send her to prison for 40 years and likely keep any more details about her part in the crime shrouded in mystery.

With a July 11 trial date looming, Sanchez was facing mandatory life in prison if convicted of second-degree murder. But after reaching a plea deal with Jefferson Parish District Attorney Paul Connick’s office, she pleaded guilty to the lesser charge of manslaughter, along with the original charges of obstruction of justice and conspiracy to obstruct justice.

Judge Stephen Grefer, of the 24th Judicial District Court, gave Sanchez the maximum sentence on each charge: 40 years for manslaughter, 40 years for obstruction of justice and 20 years for conspiracy to obstruct justice. All three sentences will run concurrently, but they could still put Sanchez, 32, in jail into her 70s.

Her ex-boyfriend, Terry Speaks, was convicted last year in connection with the same crime and is serving what amounts to two life sentences in the Louisiana State Penitentiary at Angola.

“After consulting with Ms. Lockhart’s family, it was decided that the negotiated plea agreement was in the best interests of all parties involved,” Connick said in a written statement. “Out of respect for Ms. Lockhart and her family, I will not comment further on the case or the evidence.”

Lockhart, 22, was captured on surveillance camera footage leaving Temptations Gentleman’s Club with Speaks and Sanchez after her shift there in the early morning of June 6, 2012.

Co-workers testified that Speaks and Sanchez had been looking to hire a girl to come back to their Kenner home for a “private party.” Lockhart — drug-addicted and struggling to get by while living in a Tulane Avenue motel with her boyfriend — agreed to go home with them.

License plate recognition cameras spotted Sanchez and Speaks’ car entering Kenner just before 3 a.m., and again that night when it crossed the Mississippi state line at 9:30 p.m. and returned about 90 minutes later.

In the following days, pieces of Lockhart’s body began washing up on the beaches of Hancock County. Her tattoos had been cut off her body.

Lockhart left behind a 3-year-old daughter.

“Words cannot express the pain her family and friends have endured since the murder,” Donna Kulick, the child’s guardian, said during victim impact testimony Monday.

Kulick said Lockhart’s family is “forever broken” and that Lockhart’s daughter still cries over the loss of her mother. “This will have a huge impact on her for the rest of her life,” Kulick testified.

Speaks recently wrote a letter from prison saying he would refuse to testify in the trial if called. His trial ended with his conviction on June 19, 2015, though prosecutors never specified who they thought plunged a 4.5-inch blade once through Lockhart’s chest.

Prosecutors Doug Freese and Tommy Block demonstrated investigators’ theory of the stabbing for jurors on the first day of testimony at Speaks’ trial, showing how one of the two accused killers straddled Lockhart as she lay on her back and stabbed her once in the heart as the other pinned her arms to the floor above her head.

On the second day of testimony, Freese mentioned Sanchez when he asked a Hancock County investigator about an astronomical event known as the Venus Transit.

The Venus Transit, which occurred on June 5 and June 6 in 2012, takes place when Venus can be seen passing in front of the sun. It is sometimes associated with sacrifices for love.

Speaks’ attorney twice objected to the phrasing of the question, and it never went further than the fact that the Hancock County Sheriff’s Office considered it as a possible motive at one point.

Sanchez’s role in the murder also came up in an email Speaks sent to her while he was in prison on other charges in upstate New York. The couple had been arrested in Tangipahoa Parish days after Lockhart’s body was found, but Speaks ended up in New York, where he was wanted for not registering as a sex offender, while Sanchez bonded out.

Speaks, angry after hearing Sanchez had begun dating someone else, wrote that he had saved underwear worn by Sanchez and Lockhart that morning and that he could turn them in to the police if he wanted.

He said he had “cleaned up the mess” while Sanchez went to work, an act of “spring cleaning” that prosecutors said was a reference to Lockhart’s dismemberment and the cleaning of the house afterward.

While there was never any forensic evidence tying Speaks and Sanchez to the crime, witnesses said the house smelled of cleaning products and was uncharacteristically tidy in the days after the murder. Mississippi investigators testified they found a burn pile in the yard with the circuit board from a cellphone, a towel and a strap from a shoe they believed to be Lockhart’s.

Follow Chad Calder on Twitter, @Chad_Calder.