Keri Hogan was about to become a police officer when she submitted a sample of her hair to the city of Boston for testing. The city, in turn, gave it to a company called Psychemedics, which washed the hair, dissolved it, and used gas chromatography and mass spectrometry—chemical analysis techniques—to check it twice over for evidence of cocaine. Hogan’s hair tested positive.

Boston police officers whose hair tests positive for drugs usually have two options: admit their substance abuse problems and agree to a stint in rehabilitation, or relinquish their position. But Hogan, who finished her police training prior to 2005, says that she has never used cocaine; when she sent her hair to a private company for more testing, it came back negative. Now, she and nine other black police officers are suing the city of Boston, saying that the practice of testing hair for drugs is discriminatory. Because of the chemistry behind the test, they say, it unfairly targets dark hair. The bench trial for the case began on March 12, and may have long-lasting consequences for the future of drug testing.

The hair test was developed in the late ‘60s, when an Austrian chemist named Werner Baumgartner decided to piggyback on the work of his wife. Annette Baumgartner was working at the Aerospace Corporation, trying to figure out what toxins might be ingested by onlookers during a shuttle launch, and Werner realized that he could look for drug exposure with the strategies she developed. Substances floating around the blood eventually get incorporated into the hair as it grows—either through tiny blood vessels or the oil and sweat glands that surround the hair follicle—and drugs found inside the hair itself, he realized, would be harder to cheat on than urine or saliva tests. They’d linger longer in the sample, too.

Baumgartner demonstrated the full force of the procedure when he used it to identify opiate painkillers in the poet John Keats’ hair, which the lab received from a rare book collection at the University of Texas at Austin. After a Time Magazine story about the Keats test, several businessmen approached Baumgartner with the intent to start a company, and Psychemedics was born.

In 1985, a navy chemist named David Kidwell was tasked with studying the test’s effectiveness—and soon, he began to have reservations. In 1993, he published the results of an experiment in which he soaked the hair in a mix of cocaine derivative and water, then washed it repeatedly before performing the drug test. Despite his attempts to remove the external contamination, the tests came back positive.

Baumgartner argued that Kidwell had used the wrong wash procedure; the test was still reliable. But Kidwell and his research partner lashed back: “At the current level of understanding, the presence of drugs in an individual's hair indicates exposure to that compound,” they wrote. “Attempting to expand this observation into the suggestion of use or long-term abuse of a drug would seem unwarranted at this time.”

Thus began a scientific back-and-forth that has continued to this day. Scientists like Kidwell argue that both external and ingested cocaine binds to melanin in the hair. People with black hair have more melanin in general, but especially more of the subtype eumelanin, which studies have shown binds particularly well with cocaine and amphetamines. (Gray hair doesn’t have much of any type of melanin, so if you want to get away with using cocaine, aging may be your best bet.) And researchers disagree over whether hair can ever be washed clean of any and all drugs it could have come into contact with from the outside.

Despite those questions, both the Boston and New York police departments, 10 to 15 percent of Fortune 500 companies, court systems, federal reserve banks, and numerous high schools still use the hair test. The FBI phased it out in 2009, then re-implemented it in 2014. About 200,000 drug tests are run on hair in the US every year.

Meanwhile, research from Kidwell and other scientists has shown that both the amount of melanin in the hair and some chemical treatment involved in styling makes a difference in how much contamination the hair can absorb. Kidwell has appeared as an expert witness in many lawsuits about the validity of the tests over the last 20 years.

“I am not sure there will ever be absolute settlement,” says Bruce Goldberger, the chief of forensic medicine and a professor of toxicology at University of Florida Health. He was the first person to find a way to identify the difference between heroin and morphine in a drug hair test.

The law has generally sided with Pyschemedics. But in 2012, the state of Massachusetts ruled that the hair test alone is not enough to terminate employment. Six police officers were reinstated in their jobs, and Hogan finally graduated from the police academy. She and the other plaintiffs are now in a federal court, asserting that the test is specifically discriminatory.

The stakes are high. Everyone wants police officers and other public servants to be as alert as possible, especially in dangerous situations. The FDA has approved Psychemedic’s hair tests for eight drugs, not just cocaine. Raymond C. Kubacki, now CEO of Psychemedics, says that scientific accuracy is the company’s top priority. “Psychemedics is a pioneer in the washing technique,” he says. “It’s important that we don’t have anyone falsely accused because of outside contamination.”

But the hair test puts an undue burden on African Americans, and especially African American women. Common hair styles mean that simply cutting a chunk of hair for the test can be harder for these women. And adding extra hurdles for this group to join and stay in law enforcement could cost the city: Male police officers cost the government between two to five times more in legal fees than female police officers—and only about 13 percent of policy officers identify as women.

Though Hogan has already been reinstated, the risk of future false positives still looms over her peers, both in and out of law enforcement. The result of her discrimination case, which is still ongoing, should inform the use of a potentially flawed test—and hopefully spur the development of others.

Read more: