A 29-year-old Maryland man was arrested Tuesday nearly two years after he allegedly attacked a stranger at a Gaithersburg bus stop at 5:30 a.m., forced her down an embankment behind the stop, shoved cocaine into her mouth and face, and raped her, according to court documents.

The victim was knocked unconscious during that attack, authorities say. She awoke naked except for her socks and underwear, ran home, and called police, according to charging documents filed Wednesday.

“It just doesn’t get more serious than this,” Montgomery County prosecutor Robert Hill said at a hearing Wednesday, arguing that the suspect, David Lee Williams, of Germantown, should remain in jail while his case proceeds.

District Judge Karen Ferretti agreed, ordering Williams held without bond.

Detectives in the case began to make progress last month after making a strategic decision to concentrate on a 2017 unsolved attempted burglary, knowing that DNA found at that scene matched DNA found at the rape scene.

“We just kind of dummied it down and chased the burglary,” said Sgt. Chris Homrock, head of the Montgomery County Police Department’s cold-case squad. “We figured: Solve the burglary, solve the rape.”

David Lee Williams (Montgomery County Police)

Aided by other clues, including a cellphone call made in 2017 that police say was linked to the burglar, detectives keyed on Williams. They tracked him down Tuesday morning, collected a DNA sample from the inside of his cheek, and got it to the county’s crime lab. Eight hours later, the lab said it matched the DNA from the rape scene, according to Homrock and court records.

In years past, Homrock said, DNA testing could take months. Technology has improved, and in this case the lab also agreed to put the testing at the front of its line.

“This was such a violent crime, we wanted to the get the results as fast as possible,” he said.

By 5:28 p.m. Tuesday, court records show, detectives had a signed warrant for Williams’s arrest — and took him into custody soon after.

The rapid forensic turnaround, though, raised the doubts of Williams’s parents, who asked how the test could have come back so quickly .

“My son didn’t do this. There’s something not right with this case,” Virgel Williams, the suspect’s mother, said after court.

She said her son has two daughters, ages 2 and 4, and noted that he didn’t try to flee between the time detectives took his DNA and when they returned and arrested him.

“He’s a loving person,” she said.

John Lavigne, an attorney who represented him in court Wednesday, said Williams denies the allegations.

A police spokesman said additional charges related to the burglary case are anticipated.

Police said the rape happened the morning of Oct. 6, 2017, along Watkins Mill Road near Travis Lane. After grabbing the victim from behind, police said, the assailant “threw her down the embankment behind the bus stop” and toward a wooded area, detectives wrote in court papers.