Dr. Gerold Sibanda, a primary care doctor in rural Greensboro, Ala., said he viewed unequal treatment of pain in black patients as a real problem.

“l meet patients who are changing doctors because ‘I’m still in pain,’” said Dr. Sibanda, who works for Whatley Health Services. “And when I ask, sometimes they haven’t been tried on what you would think would be traditional medications — nonnarcotic, even — for whatever their pain is.”

Whatley also provides care to inmates at the Tuscaloosa County Jail, and is caught up in a lawsuit filed in May by the family of a black inmate who died of a perforated ulcer, according to the suit, after his complaints of severe pain were ignored for days. Dr. Sibanda is not implicated in the lawsuit.

Several patients, including Ms. Lewis, said they thought that doctors had mistreated them, but that it had happened because they were poor or uninsured, not because they were black.

“I don’t think it’s prejudice,” said Rita Evans, 57, a black former factory worker in Winfield, Ala., with a bulging disc in her back and a pinched nerve in her neck. “I think it’s the money.”

Ms. Evans, who often sleeps sitting up to keep immobilizing neck pain at bay, said her doctor had prescribed muscle relaxants and a nonnarcotic drug for her nerve pain. She said that she knew plenty of people who got opioids from pain clinics, but that with no income or insurance, she could not get in the door. Instead, she said, “you talk yourself through it or pray on it.”