Matthew is charged with attempted capital murder, abduction and sexual assault in connection with a September 2005 attack on a woman in Fairfax City. The maximum punishment for each of these charges is life in prison. He must also register as a sex offender for two of the offenses.

The plea came Wednesday afternoon after the prosecution rested its case with DNA evidence linking Matthew to the Fairfax case. Defense lawyers have tried unsuccessfully to get the judge to strike the case.

Fairfax County Commonwealth's Attorney Ray Morrogh said Matthew is entering the Alford plea without any plea agreement with prosecutors.

"Yes, I was a bit surprised by it. I thought the trial was going very well, from the commonwealth's standpoint,” Morrogh said. “All of our evidence was coming in, and I was very confident in the case that we were building, but I had hoped to present this to a jury for a decision."

Willy McDuffy was one of the jurors on the case. He thought Matthew was guilty, saying the DNA evidence sealed the deal for him. 

“Personally, I believe we would have all came to agreement that he was guilty," the juror said.

Sentencing will be held on October 2 at 2 p.m.

"He'll get his just due," McDuffy said.

The victim in the Fairfax case will testify Thursday, June 18, at 2 p.m. She said she wants to testify to address her rights as a victim and the impact this has had on her.

The jury has been dismissed in the Fairfax trial.

Matthew is also charged in a separate case with the abduction and killing last year of University of Virginia student Hannah Graham. Authorities have said the two cases are linked by DNA evidence.

The Graham case will be tried separately. Prosecutors in that case are seeking the death penalty.

The Associated Press contributed to this article.