The attacker abducted the 5-year-old from her bed in the dead of night, took her to a wooded area nearby, sexually assaulted her and repeatedly stabbed her with a butcher knife.

The girl managed to walk back to her Springfield home and awaken her mother with her cries that night last August, the mother said, describing the moment she found the girl to a Fairfax County jury on Monday.

“When I turned the light on, I realized there was blood,” the woman said.

The testimony came at the start of the trial of Jonathan Nathaniel Ramsey, 16, who is being tried as an adult.

During opening statements, the prosecution and defense largely agreed on the circumstances of what happened to the girl, but offered differing accounts of who committed the crime.

Fairfax County Chief Deputy Commonwealth Attorney Casey Lingan said the family had gone for a walk the night of Aug. 26, 2011. They then watched TV and ate popcorn before settling down for the night in their home in the 7000 block of Brocton Court. The Washington Post generally does not identify victims of sex crimes, so is not publishing the names of the girl or her mother.

Lingan said that as the family slept, Ramsey crawled through a window at the front of the house, leaving fingerprints and a shoe print. He then went upstairs, abducted the girl and took her to the wooded area, Lingan said.

The attack left the girl with deep stab wounds on one arm, cuts on one wrist, puncture wounds on her back and saw-like cuts across her neck, Lingan said. When the girl returned home, she was filthy, had lost her pajama pants and the T-shirt she wore — which said “I [heart] my world” — was soaked in blood, Lingan told the jury.

“It was clear that the intruder came for one reason,” Lingan said.

Later, police discovered a pair of bloody boxer shorts and a shirt on the back porch of Ramsey’s home. Tests indicated that the girl’s DNA was on those clothes, Lingan said. Ramsey was charged in September with object sexual penetration, abduction with intent to defile, aggravated malicious wounding and burglary with intent to commit a felony, police said.

Defense lawyer Andrew Elders said during his opening statement that Ramsey had broken into the home intending to burglarize it, not to abduct and assault a child. Elders said a friend of Ramsey’s carried out the attack. The friend was with Ramsey that night and had admitted to abusing a 7-year-old girl, Elders said.

Elders said Ramsey crawled through the window of the home but bolted from the house after his friend said he saw a light on in the basement.

Ramsey fled to a bench near the home, Elders said, and watched as his friend carried the child out of the home. Ramsey then left the scene, eventually going to his home, which was a few blocks from the girl’s residence.

Elders said Ramsey would testify during the trial to the story. He also said a third person’s DNA was found on the clothes police recovered from the porch of Ramsey’s home.

“The power to lead can be the power to mislead,” Elders said. “Scientific evidence can be wrong.”