California and Georgia might not seem like they have much in common. But both states are struggling to contain a spike in the number of newborns infected with congenital syphilis.

According to the Centers for Disease Control and Prevention (CDC), the number of congenital syphilis cases has reached its highest level since 2001. In 2015, the latest year for national data, 487 babies were born with the disease, which was nearly eradicated around 2000. Meanwhile, rates for sexually transmitted diseases (STDs) in general are at an all-time high.

Congenital syphilis is when syphilis is passed down from a mother to her fetus. The disease can cause miscarriages and stillbirth. For newborns, it can result in brain and nerve problems, bone deformities, meningitis and death.

Kern County, Calif., in the state’s Central Valley, is experiencing unseen rates of the infection. Three cases in 2013 jumped to 18 in 2014 and topped out at 28 in both 2015 and 2016. This is after decades of seeing “one case at most per year,” says Denise Smith, the county's director of disease control.

California has the third highest rate of congenital syphilis, after Georgia and Louisiana. Outbreaks vary in size and scope, but health officials agree there are at least two common factors contributing to the problem everywhere: the opioid epidemic and lack of prenatal care.

“If someone is actively engaged in substance abuse, they’re not thinking about their health care,” says Kern County's Smith.

Women who use drugs, particularly opioids like heroin and methamphetamine, are more at risk of contracting syphilis because it can be transmitted through needles as well as sex. Karen Landers, medical director for communicable diseases at the Alabama Department of Public Health, says that pregnant women using drugs are less likely to seek prenatal care and therefore learn they have syphilis. Unless treated with antibiotics early in a pregnancy, syphilis has a 50 percent chance of infecting a baby.

CDC data shows that overdose deaths involving opioids began to rise sharply in 2013, the same year congenital syphilis started to come back. Before that, overdoses were actually steady after years of gradually increasing.

To tackle the problem, areas have ramped up STD testing and public awareness campaigns.

In Alabama, where the number of congenital syphilis cases tripled from three to 10 last year, the state has dispatched additional staff to the hardest-hit county. "If someone comes into a [health department] building and is pregnant, we’re testing her,” says Landers. While 10 cases is small, Landers says it's too high for a treatable and deadly disease.

In California, Kern County launched a public awareness campaign called “Know Your Risk.” It encourages everyone -- through billboards, fliers and PSAs -- to get regular STD tests.

And Smith says the county's efforts appear to have paid off so far: In 2016, Kern County prevented 60 cases of congenital syphilis.