NEW YORK (AP) — U.S. health officials plan to endorse a common antibiotic as a morning-after pill that gay and bisexual men can use to try to avoid some increasingly common sexually transmitted diseases.

The proposed CDC guideline was released Monday, and officials will move to finalize it after a 45-day public comment period. With STD rates rising to record levels, “more tools are desperately needed,” said Dr. Jonathan Mermin of the Centers for Disease Control and Prevention.

The proposal comes after studies found some people who took the antibiotic doxycycline within three days of unprotected sex were far less likely to get chlamydia, syphilis or gonorrhea compared with people who did not take the pills after sex.

The guideline is specific to the group that has been most studied — gay and bisexual men and transgender women who had a STD in the previous 12 months and were at high risk to get infected again.

There’s less evidence that the approach works for other people, including heterosexual men and women. That could change as more research is done, said Mermin, who oversees the CDC’s STD efforts.

Even so, the idea ranks as one of only a few major prevention measures in recent decades in “a field that’s lacked innovation for so long,” said Mermin. The others include a vaccine against the HPV virus and pills to ward off HIV, he said.

Doxycycline, a cheap antibiotic that has been available for more than 40 years, is a treatment for health problems including acne, chlamydia and Rocky Mountain spotted fever.

The CDC guidelines were based on four studies of using doxycycline against bacterial STDs.

One of the most influential was a New England Journal of Medicine study earlier this year. It found that gay men, bisexual men and transgender women with previous STD infections who took the pills were about 90% less likely to get chlamydia, about 80% less likely to get syphilis and more than 50% less likely to get gonorrhea compared with people who didn’t take the pills after sex.

A year ago, San Francisco’s health department began promoting doxycycline as a morning-after prevention measure.

With infection rates rising, “we didn’t feel like we could wait,” said Dr. Stephanie Cohen, who oversees the department’s STD prevention work.

Some other city, county and state health departments — mostly on the West Coast — followed suit.

At Fenway Health, a Boston-based health center that serves many gay, lesbian and transgender clients, about 1,000 patients are using doxycycline that way now, said Dr. Taimur Khan, the organization’s associate medical research director.

The guideline should have a big impact, because many doctors have been reluctant to talk to patients about it until they heard from the CDC, Khan said.

The drug’s side effects include stomach problems and rashes after sun exposure. Some research has found it ineffective in heterosexual women. And widespread use of doxycycline as a preventive measure could — theoretically — contribute to mutations that make bacteria impervious to the drug.

That kind of antibiotic resistance hasn’t materialized in San Francisco, but it will be important to watch for, Cohen said.