OKLAHOMA CITY — For months, health officials in this socially conservative state capital have been staggered by a fast-spreading outbreak of a disease that, for nearly two decades, was considered all but extinguished.

Syphilis, the deadly sexually transmitted infection that can lead to blindness, paralysis and dementia, is returning here and around the country, another consequence of the heroin and methamphetamine epidemics, as users trade sex for drugs.

To locate possible patients and draw their blood for testing, Oklahoma’s syphilis detectives have been knocking on doors in dilapidated apartment complexes and dingy motels, driving down lonely rural roads and interviewing prison inmates. Syphilis has led them to members of 17 gangs; to drug dealers; to prostitutes, pimps and johns; and to their spouses and lovers, all caught in the disease’s undertow.

“Syphilis doesn’t sleep for anyone,” said Portia King, a veteran Oklahoma state health investigator. “We have 200 open cases of sex partners we’re looking for. And the spread is migrating out of the city.”