Researchers identified 13 STRs that were very effective in matching people to DNA samples. The probability of the STRs all being identical in two unrelated people is less than 1 in a trillion.

DNA testing became a standard legal tool for identifying criminal suspects and resolving paternity disputes. But for all its power, the test could not tell identical twins apart. And that led to some Kafkaesque impasses.

In 2004, for example, Holly Marie Adams won a paternity suit in Missouri against Raymon Miller for child support. A standard DNA test indicated he was the alleged father. Mr. Miller appealed the case because Ms. Adams had also had sex with his twin brother, Richard. A DNA test on Richard also yielded a match.

“The results of blood tests performed on the two brothers demonstrated that both had a 99.999 percent probability of being the father,” Judge Phillip Garrison wrote. The court was forced to rely on other evidence — the timing of the woman’s pregnancy, for example — to decide that Raymon Miller was in fact the father.

Faced with such cases, forensic DNA experts tried something once thought impossible: building a test that could tell twins apart. The researchers took advantage of the fact that identical twins are not, in fact, genetically identical.

When a fertilized egg starts dividing, there’s a small chance each new cell will gain a new mutation. When the cells separate into twin embryos, one gets some of the mutant cells and the other gets the rest. Unique mutations will end up in cells throughout each twin’s body.

In the mid-2000s, scientists at the University of Hanover in Germany wondered if new STRs could arise in one twin and not the other. They developed a test to examine thousands of STRs instead of just 13.