This undated handout photo provided by the Maryland State Police/Child Recovery Unit shows 11-year-old William McQuain.

Hours after he slammed a 30-pound dumbbell into his estranged wife’s head, prosecutors say Curtis Lopez had a decision to make: Flee the Washington area immediately or stick around and pick up the slain woman’s son, who had spent the night at a buddy’s house.

The second option would keep the 11-year-old boy from coming home and discovering the crime, buying Lopez more time.

The chilling account of what happened next was laid out by prosecutors in Montgomery County Circuit Court on Friday as Lopez acknowledged that there was sufficient evidence to convict him of two counts of first-degree murder in a case dating to the autumn of 2011.

Lopez decided to pick up William McQuain, prosecutors said. It wasn’t a hard thing to pull off: William knew him, and William probably trusted him, according to the prosecutors. Lopez drove the youth to the Clarksburg area, in the northern part of the county, and the two got out, Lopez carrying a baseball bat.

Prosecutors aren’t sure what he told William — maybe that they were going to play catch, maybe it was as simple as, “Hey, follow me over here.” But at some point, Lopez got behind William and slammed the bat into the back of his head. He struck William at least three more times, leaving the boy’s skull shattered into 36 pieces. The boy was left in a wooded thicket, where his body wouldn’t be discovered for 18 days.

Curtis Lopez (Charlotte-Mecklenburg Police Department)

Detectives needed a forensic anthropologist to glue William’s skull back together as part of their case, authorities said.

In court Friday, Lopez, 46, did not admit guilt. Instead, he entered an Alford plea, in which a defendant acknowledges that there is enough evidence to convict him. Such a plea is tantamount to a conviction. Prosecutors say he also stole Jayne McQuain’s Honda CR-V, a flat-screen television, Williams Xbox video games and other items.

Lopez is expected to offer his version of events when he returns to court in April to be sentenced. Prosecutors will ask Judge Mary Beth McCormick to sentence him to life in prison without the possibility of parole.

“He deserves to die in jail,” Montgomery County State’s Attorney John McCarthy said after court Friday.

When news of the crimes broke 15 months ago, it unfolded in shocking and heartbreaking fashion. First, Jane McQuain, 51, was found slain in the Germantown apartment she and William shared. The boy was nowhere to be seen. Relatives, police and neighbors hoped he was alive. A picture of William in his all-star baseball uniform became ubiquitous on television and other media.

Police ultimately found his body, with a baseball bat just a few feet away. William’s death sent a wave of mourning through families in Germantown, where children still talk about the smiling and polite kid and parents wonder how to possibly shield them from details of how he died.

Lopez was to go on trial in the case Monday. His attorney, Alan Drew, declined to comment after court Friday.

The hearing lasted nearly 90 minutes and provided a window to what prosecutors would have presented at the trial.

Here is their account:

The story goes back about 24 years, to when Jane McQuain and Curtis Lopez married while Lopez was in prison. The two never lived together after he got out, but they stayed in touch. Lopez lived for much of this time in North Carolina.

Meanwhile, McQuain was living in Germantown, working at a small accounting firm and raising William as single mom. Lopez was not William’s biological father.

“William and Jane McQuain were each other’s worlds,” Deputy State’s Attorney John Maloney said in court. He said that during the investigation, Jane McQuain’s friends were asked what her interests were. “They said one word: ‘William.’ ”

At some point, Lopez got her to send him money for a train ticket to the Washington area.

On Sept. 30, while Lopez was still staying with her, Jane McQuain drove William to a friend’s house for a sleepover.

During the night, as Jane slept, Lopez retrieved a 30-pound dumbbell from inside her condominium. He slammed it into her head, splitting her skull. Lopez also stabbed her twice in the back. He likely used the knife because the weight hadn’t killed her and he needed to “finish her off,” Maloney said,

The next morning, Lopez had to decide whether to pick up William. He did — driving Jane’s CR-V.

“The defendant picked him up and never returned to the house, because Jane McQuain was already dead at that home,” Maloney said. “So there’s no way he could take young William back to his house, because he would be looking for mom. He would go into mom’s room.”