When the police arrived last November at the ransacked mansion of millionaire investor Raveesh Kumra, outside of San Jose, Calif., they found Kumra had been blindfolded, tied and gagged. The robbers took cash, rare coins and ultimately Kumra’s life; he died at the scene, suffocated by the packaging tape used to stifle his screams. A forensics team found DNA on his fingernails that belonged to an unknown person, presumably one of the assailants. The sample was put into a DNA database and turned up a hit — a man by the name of Lukis Anderson.

Bingo. Anderson was arrested and charged with murder.

There was one small problem: The 26-year-old Anderson couldn’t have been the culprit. During the night in question, he was at the Santa Clara Valley Medical Center, suffering from severe intoxication.

Yet he spent more than five months in jail with a possible death sentence hanging over his head. Once presented with Anderson’s hospital records, prosecutors struggled to figure out how an innocent man’s DNA could have ended up on a murder victim.

Late last month, prosecutors announced what they believe to be the answer: The paramedics who took Anderson to the hospital were the same ones who went to the crime scene at the mansion a few hours later. Prosecutors now conclude that at some point, Anderson’s DNA must have been accidentally transferred to Kumra’s body — probably by the paramedics’ clothing or equipment.

This theory is still under investigation. Nevertheless, the certainty with which prosecutors charged Anderson with murder highlights the very real injustices that can occur when we place too much faith in DNA forensic technologies.

In the end, Anderson was lucky. His alibi was rock solid; prosecutors were forced to concede that there must have been some other explanation. It’s hard to believe that out of the growing number of convictions based largely or exclusively on DNA evidence there haven’t been any similar mistakes.

In one famous case of crime scene contamination, German police searched for around 15 years for a serial killer they called the “Phantom of Heilbronn” — an unknown woman linked by traces of DNA to six murders across Germany and Austria. In 2009, the police found their “suspect”: A worker at a factory that produced the cotton swabs police used in their investigations had been accidentally contaminating them with her own DNA.

Contamination is not the only way DNA forensics can lead to injustice. Consider the frequent claim that it is highly unlikely, if not impossible, for two DNA profiles to match by coincidence. A 2005 audit of Arizona’s DNA database showed that, out of 65,000 profiles, nearly 150 pairs matched at a level typically considered high enough to identify and prosecute suspects. Yet these profiles were clearly from different people.

DNA forensics is an invaluable tool for law enforcement. But it is most useful when it corroborates other evidence pointing to a suspect, or when used to determine whether any two individual samples match, like in the exonerations pursued by the Innocence Project.

But when the government gets into the business of warehousing millions of DNA profiles to seek “cold hits” as the primary basis for prosecutions, much more oversight by and accountability to the public is warranted. For far too long, we have allowed the myth of DNA infallibility to chip away at our skepticism of government’s prosecutorial power, undoubtedly leading to untold injustices.

In the Anderson case, thankfully, prosecutors acknowledged the obvious: Their suspect could not have been in two places at once. But he was dangerously close to being on his way to death row because of that speck of DNA. That one piece of evidence — obtained from a technology with known limitations and susceptible to human error and prosecutorial misuse — might mistakenly lead to execution at the hands of the state should send chills down every one of our spines. The next Lukis Anderson could be you. Better hope your alibi is as well documented as his.

Osagie K. Obasogie, a professor of law at the University of California, Hastings, and a senior fellow at the Center for Genetics and Society, is the author of the forthcoming book “Blinded by Sight: Seeing Race Through the Eyes of the Blind.” His email address is obasogie@uchastings.edu.