City health officials issued an advisory Wednesday after two young children in Boston were diagnosed with meningococcal disease — a highly contagious illness that can lead to meningitis.

Both confirmed cases were linked to daycare centers with a focus on serving children who have experienced homelessness, according to a joint statement from Mayor Marty Walsh and the city's public health commission. It was not known if the two cases were connected, however.

Meningococcal disesase, which is caused by a bacteria, spreads through saliva or spit, and therefore requires close contact, according to the health commission. It can take several forms, "including infection of the blood and infection of the brain and spinal cord, known as meningitis," the statement said.

Unlike other infectious diseases, the bacteria does not linger for long in a building or room after an infected person leaves it. The last day either child was at one of the centers was Friday.

Anyone known to have contact with the two children was given antibiotics "as a precautionary measure" to decrease the likelihood of the disease's spread, according to city officials.

The officials also encouraged concerned residents to speak with their doctors about vaccine options. The Centers for Disease Control and Prevention recommends that all preteens be vaccinated for meningococcus between the ages of 11 and 12, with a booster preferably given between ages 16 to 18. (Babies and children are not usually vaccinated unless there are specific health concerns.)

Most people who become infected present symptoms — such as nausea, vomiting, increased sensitivity to light and confusion — within four days of exposure, according to the commission.

With reporting from The Associated Press