Virginia's top forensic scientist was skimming through a convicted rapist's file trying to confirm that all the evidence in the case had been destroyed. Almost by accident, he ran across a yellowed old cotton swab taped to the bottom of a testing chart.

The DNA on that swab led to the exoneration of a Virginia man who had served 15 years in prison. And the fluke of its discovery set in motion a chain of events that resulted in Virginia Gov. Mark R. Warner's extraordinary decision last week to reexamine dozens of old criminal cases to determine whether new technology could exonerate more prisoners.

Warner (D) ordered the state's DNA laboratory to initiate testing in about 40 cases, mostly sexual assaults, after examining about 10 percent of cases on file in state archives from the 1970s and '80s. Experts yesterday called the move unprecedented.

"This is the first time a state has ordered a review of a class of cases where the inmate has never even requested any DNA testing," said Peter Neufeld of the Innocence Project at the Benjamin N. Cardozo School of Law. "Other states will be keeping an eye on what Virginia does."

Normally, it is up to inmates to request testing for DNA evidence, a process that has triggered the exoneration of more than 100 prisoners across the country in recent years, including at least three in Virginia. Until recently, Virginia had blocked inmates from seeking DNA testing unless they made the request within three weeks of their conviction.

Now, in a state that had been known for its strict post-conviction rules, staff members are poring through as many as 600 boxes of evidence looking for cases in which the DNA is still testable. The results of those tests could have far-reaching implications nationwide, regardless of what is found, lawyers and others said. If they determine that all the inmates are imprisoned properly, then some people might have more confidence in the criminal justice system. If the tests find innocent defendants, then justice would be served, the experts said.

"What this points to is the wonderful ability of DNA evidence to assist the triers of fact to determine guilt or innocence," said Paul Ferrara, director of the state's division of forensic science, whose office is in charge of the testing. "We're as happy to exonerate an innocent person as we are to identify a serial rapist."

Ferrara said the 40 samples would be chosen from about 150,000 cases by his staff and sent to a private lab for the testing. Warner should get the results in four to six months.

Alexandria Commonwealth's Attorney S. Randolph Sengel said yesterday that he supports Warner's goal of exonerating the innocent but is worried that the directive might worsen an already steep backlog of cases awaiting DNA testing at the state lab.

"I've always supported the idea that if there is a reasonable chance someone has been wrongfully convicted . . . government has an obligation to do what it can," Sengel said. "But I would hope that if the state is going to commit funds to review old cases, they can redouble their efforts to keep up with current ones."

Defense lawyers have also expressed mixed views over Warner's order, with some calling it a significant step forward but others urging the state to go further by testing all of the old cases in which biological samples exist.

It was Ferrara whose discovery in fall 2001 led to Warner's announcement last week. Ferrara was in his office in Richmond, scanning the file of Marvin Lamont Anderson of Hanover County, who had been convicted of rape. Anderson's attorneys had been seeking old evidence, but the police already had told them all evidence had been destroyed. They asked again, so Ferrara pulled the file.

He said that when he came across the yellowed cotton swabs, he thought, "Well, heck, we could possibly still get some DNA results from this."

It turned out that some technicians in Ferrara's office had been attaching what are known as "cuttings" -- swabs from their testing -- to their test notes that were in the state lab's files. It wasn't the lab's policy, and Ferrara said he had been unaware of it.

But only some technicians had kept the swabs, and even then, the cases involved were only those between 1973 and 1988. In 1989, the lab became accredited by a national agency and began enforcing what was supposed to be its policy of returning all evidence to law enforcement agencies.

Until 2002, when the legislature passed a law requiring that biological samples be kept for 15 years, most agencies threw out samples after the appellate process had ended, Ferrara said.

The DNA testing triggered by Ferrara's discovery led to the exonerations of Anderson; Julius Earl Ruffin of Virginia Beach, who spent 21 years in prison for a rape he did not commit; and Arthur Lee Whitfield of Norfolk, who spent 23 years in prison for two rapes he did not commit. The Whitfield exoneration in particular, Ferrara said, caused the state to consider wider testing.

The files from 1973 to 1988 are contained in 400 to 600 boxes in the state library in Richmond. For the past several weeks, three staff members have been combing through boxes in Ferrara's office seeking cases in which the evidence was not discarded or degraded. The vast majority of them will be sexual assault cases, though officials expected to examine some homicide cases as well.

Ferrara said there are myriad complications, including samples that are too old to be adequately tested and the amount of time it takes his staff to pull the samples.

Warner, ultimately, will decide whether the testing is conclusive enough for clemency or whether additional testing is needed.

Gov. Mark R. Warner (D) ordered new DNA testing in a sampling of about 40 cases to see whether the evidence against convicts holds up.