SAN FRANCISCO — Health officials in San Francisco have advised some gay men to consider getting vaccinated against meningitis if they recently traveled or plan to go to New York City.

At least 11 cases of meningitis have been reported among gay men in New York City in the past year.

San Francisco health officer Tomas Aragon said Thursday that men should discuss vaccination with their doctor if they had close or intimate contact with other gay men in New York City or plan to go there and have such contact.

New York City officials also expanded their vaccination recommendation last week, advising vaccination for gays who have had intimate contact with other men who they met through a website, digital application or at a bar or party since Sept. 1, regardless of their HIV status.

The recommendation applies to certain neighborhoods in Brooklyn.

The cases in New York City have been of the bacterial form of the disease, which can be deadly, according to health officials.

Meningitis affects the tissues around the brain and spinal cord. It can spread through contact with spit or mucus. Symptoms include fever, headache and a stiff neck.