In the emergency room, not all pain is created equal.

At least that’s what researchers discovered in a recent study comparing pain treatment between white and black patients in the ER. The survey of national hospitals found that black patients with back or abdominal pain were consistently less likely to be given or prescribed opioid-based pain medication than white patients with identical symptoms. For each case, the University of California San Francisco researchers noted, “pain severity” was the leading factor determining whether or not a patient received pain medication.

“Whether or not someone ‘needs’ opioids is a very subjective decision — there isn’t an objective test.”

This determination is entirely up to the doctors, said one of the study’s authors, Renee Hsia.

“Whether or not someone ‘needs’ opioids is a very subjective decision — there isn’t an objective test,” she said.

Her team’s conclusion points to a few gaps in the medical system, including implicit biases among ER doctors and a dangerous inability to assess patient pain. However, the researchers point out, this trend can be easily detected without a peer-reviewed paper like theirs. The nation’s opioid epidemic paints a starkly similar picture.

“ Recent evidence shows that non-Hispanic whites are disproportionately affected by the prescription opioid epidemic,” they write. “While non-Hispanic blacks do not benefit from bias, they might be inadvertently benefiting by receiving fewer opioid medications and prescriptions.”

In 2014, nearly 38,000 white Americans died of an overdose linked to prescription opioids, compared to 4,000 black Americans. But pain experts are quick to downplay this potential “silver lining.”

“We may agree that opioids can be harmful and that fewer of them may be a good thing,” Adam Hirsh, a pain researcher at Indiana University, told the New York Times. “But we should not ignore that black and white patients are getting treated differently.”

And UCSF researchers agree.

“Nonetheless,” the paper reads, “the access to pain management decisions should be made without regard to race and ethnicity.”

These new results contribute to the growing collection of research on how few black patients are accurately treated for serious pain — an error that’s left a disproportionate number of black people with lifelong disability as a result. Another recent study found that after age 65, black Americans live with far more disabilities than whites, regardless of how long they live.

There’s evidence that the so-called “pain gap” stems from doctors’ implicit biases about black people. Just this April, a University of Virginia study found that many medical students still hold onto the racist, entirely false idea that black people have a higher tolerance for pain than white people. Some students even said they believed black blood coagulates more quickly than white blood — an unscientific excuse once used to justify the segregation of blood supply among races.

“The access to pain management decisions should be made without regard to race and ethnicity.”

These historic prejudices also reflects the under-representation of black physicians in the medical system. Medical school admission for black students has steadily declined since 1991, and now a mere 5 percent of the country’s doctors are black.

UCSF researchers said the only way to shift these incorrect assumptions — implicit or explicit — is through education.

“In the media you see a lot about how we need to change the culture because we have inherent biases, and this study shows these biases even affect healthcare,” Hsia said. “The first step is looking for these disparities. We can’t do anything about them unless we know that they exist.”