(CNN) Caesar salad lovers rejoice -- your crispy romaine lettuce leaves are OK to eat now.

The nationwide, monthslong E. coli outbreak linked to romaine lettuce ended Wednesday, according to the US Centers for Disease Control and Prevention and the US Food and Drug Administration.

The romaine, which came from Salinas, California, infected a total of 167 people in 27 states.

This included 85 hospitalizations, including 15 patients who developed a type of kidney failure -- hemolytic uremic syndrome -- known to be associated with this particular type of bacteria, E. coli O157:H7. The toxin produced by the bacteria typically causes symptoms such as vomiting, stomach cramps and bloody diarrhea.

No deaths have been linked to the outbreak.

The onset of illnesses were reported between September 20 and December 21, 2019, and the outbreak affected people ranging in age from younger than 1 to 89.

Nearly two-thirds of those impacted were female.

The CDC no longer advises people to avoid lettuce from the Salinas Valley. The contaminated lettuce that sickened people during the outbreak is no longer being sold, the agency said.

The FDA said its investigation into the source of the outbreak is continuing, and it plans to conduct another "in-depth, root-cause investigation" to explain how contamination occurred.

Why E. coli loves leafy greens

"Leafy greens, such as lettuce, can become contaminated in the field by soil, contaminated water, animals or improperly composted manure," Jeff Farber, director of the Canadian Research Institute for Food Safety and a professor at University of Guelph in Ontario, told CNN after a 2018 outbreak. "Lettuce can also be contaminated by bacteria during and after harvest from handling, storing and transporting the produce."

People usually consume romaine lettuce without cooking it, which could kill the germs.

"Other raw fruits and vegetables that have come into contact with feces from infected animals are another common source of infection," Farber said.

Popularity also plays a role in why lettuce is a frequent bad actor: "Lettuce is also eaten the most out of all the produce items," he said.