In the surveillance video, 11-year-old William McQuain glides along the pavement, wearing sneakers with wheels on them. Then comes another image, one revealed in court Thursday: A man furtively carries a baseball bat and slips it into the back of an SUV. The two ride off.

A short time later, according to the timeline prosecutors laid out, the man slammed the bat into William’s head and hid his body in a wooded area of Montgomery County. That is where William was found Oct. 18, more than two weeks after he disappeared.

Thursday’s session in Montgomery District Court was the first appearance for Curtis Lopez, who was arrested in the case last month and is the estranged husband of William’s mother. Prosecutors think that Lopez killed her, too — using a 30-pound dumbbell and a knife — and went to court to argue that he should be held without bond.

“This case [is] basically ghastly violence on two innocent, unarmed people,” Montgomery County Deputy State’s Attorney John Maloney told District Judge Barry A. Hamilton.

Lopez appeared via video feed from the county jail. He did not get a chance to tell his side of the story. But his attorney, Alan C. Drew, called the case against Lopez “essentially circumstantial evidence” and argued that Lopez was entitled to have a bond set. Hamilton ordered Lopez held without bond.

“Certainly, it’s an incomplete investigation” at this stage, Hamilton said. “But what is there is extremely compelling thus far.”

Police have charged Lopez with first-degree murder in the death of Jane McQuain, 51. Maloney said that Lopez will be charged with killing William. Lopez also stole Jane McQuain’s 2011 Honda CR-V and items from the McQuains’ apartment, including a TV and a lamp, Maloney alleged.

Jane McQuain and Lopez, 45, who was not William’s father, had a troubled history but were still in contact. Roughly two weeks before Jane McQuain went missing, she bought a one-way train ticket for Lopez, and he headed north, Maloney said. Lopez told his girlfriend in North Carolina that he was going to visit his mother in Pennsylvania and would be getting a car, authorities said

Before Jane McQuain went missing, Lopez texted photographs of the CR-V to his girlfriend, prosecutors said.

Jane McQuain was not seen at work after Sept. 30, and her son was not seen at school after Sept. 30, according to authorities. But it took a while for anyone to report them missing.

On Oct. 12, police received a missing-persons report and went to the McQuains’ apartment on Briarcliff Terrace in Germantown.

“She was found in the corner of her bed, with blood all over the corner of the bed,” Maloney said. Found in the apartment was a 30-pound weight and a knife in the sofa, Maloney said, and officials think McQuain was stabbed in her sleep because it appeared the knife went through a blanket. William was nowhere to be found.

Police homed in on Lopez as a suspect in Jane McQuain’s slaying and William’s disappearance.

They charted Lopez’s movements using his cellphone records and the McQuains’. His records put Lopez near where William’s body was found before Lopez “made a bee line down to North Carolina,” Maloney said in court.

Authorities would later say that on the night of Sept. 30, William was at a friend’s for a sleepover and that they think Lopez picked him up the next morning, the same day they believe he killed the boy and drove to North Carolina.

When detectives called Lopez on his cellphone, he said that he hadn’t seen Jane McQuain recently and that he was in New Jersey. Police found him in North Carolina, Maloney said.

But he would not tell them where William was. Detectives searched for six days, hoping to find the boy alive, before a tracking dog in the Clarksburg area led them to his body. The bat was “a few feet away,” Maloney said.