Tomatoes at a farmers market.

For many people, weekend mornings aren’t complete without a trip to the farmers market, which may explain why there are more than 8,700 currently registered in the Department of Agriculture's Farmers Market Directory.

And there are good reasons to shop at them: Farmers markets may offer fresh, locally grown food that isn't available at your town supermarket.

But now research suggests that fresh and local doesn’t always mean it's safe to eat.  A Penn State University study published Nov. 1 in the journal Food Protection Trends assessed food safety behaviors of vendors at more than 40 Pennsylvania farmers markets and found that many didn’t follow basic sanitary practices. As a part of this investigation, published in an earlier study, the researchers also found harmful bacteria in meat and produce sold at the markets.

“A lot of people assume that because a food is produced locally it’s safer, but that’s not the case at all—it comes down to what kind of food safety practices the vendor uses,” says Judy Harrison, Ph.D., professor and extension food safety specialist at the University of Georgia. (Harrison was not involved in the study.)

What the Study Found

The researchers found large discrepancies between the food safety precautions farmers market vendors claimed they were taking and what the researchers actually observed them doing.

For example, though more than a third of vendors claimed to use disposable gloves, researchers found that less than a quarter had them at their stands. And among those who did use gloves, about half used them improperly by not changing them when they were supposed to—for example, after handling raw meat or money. “The vendors appeared to believe that they were taking appropriate measures, not realizing that they were wearing or using gloves incorrectly,” says study author Catherine Cutter, professor of food science at Penn State University College of Agricultural Sciences.

More on Food Safety

In addition to other factors, such as contamination on the farm, poor hygiene could help explain why levels of bacteria that could potentially cause food poisoning were so high in the food sold at these markets: E. coli was present in 40 percent of beef samples, 18 percent of pork samples, almost a third of lettuce and kale samples, and 17 percent of spinach samples. Listeria was found in 8 percent of beef, 2 percent of kale, 4 percent of lettuce, and 7 percent of spinach.

Though these types of bacteria can often be destroyed through proper cooking at home, “consumers should still expect the same level of food safety practices at farmers markets as they do at regular markets, because the possible negative outcomes are the same,” says James E. Rogers, Ph.D., director of food safety research & testing at Consumer Reports.

How to Shop Safely at Farmers Markets

This new study shouldn't keep you from enjoying the bounty of the local farmers market, however. “Not all farmers markets are the same, and this is one study,” says Rogers. “But it does show that consumers need to be aware of the food safety issues related to farmers markets, and take some precautions.” Keep these food safety tips in mind. 

Observe vendors carefully. Vendors should use gloves whenever they handle food, and should change them whenever they move between raw to ready-to-eat or cooked foods. They should also change them when they stop handling food to do activities such as managing the cash register or answer the phone. This is especially important with ready-to-eat-foods, Rogers says. “Raw foods that are to be cooked tend to be safer when properly prepared because you have the cooking temperature as a 'kill step' for any bacterial contamination,” he says. “But unless you are very sure that any ready-to-eat food that is purchased has been prepared and stored at the proper conditions, I would tend to avoid them.”

Stay away from raw milk and raw milk cheeses. Don’t buy milk or cheese at a farmers market unless you can confirm that it’s been pasteurized, a process that kills off dangerous bacteria. “The Centers for Disease Control and Prevention has identified raw milk as the most dangerous raw-food product, based on the types of pathogens that can be found in raw milk and the incidence of illness,” Rogers says. This is true even if the farmers tell you they have performed laboratory tests for bacteria in raw-milk products, according to the CDC, because milk that is safe one day might not be safe the next. In addition, unpasteurized juice and cider could potentially harbor harmful bacteria.

Buy perishables last. Get anything that needs to be kept cold—such as meat, chicken, and eggs—at the end of your trip, to reduce risk of it spoiling. When shopping for meat or chicken, make sure that the vendor has kept it refrigerated or stored in iced coolers. Eggs should also be properly chilled—the Food and Drug Administration requires them to be stored at 45° F.

And bring your own cooler or insulated bag to keep your meat cool and separated from fresh produce on your way home to avoid cross contamination, says Faith Critzer, Ph.D., associate professor and produce-safety extension specialist at Washington State University.

Practice food safety at home. “It’s important to follow the four C's—cleaning, cooking, preventing cross contamination, and chilling,” Cutter says. This includes washing all fruits and vegetables under running water right before eating, cutting, or cooking them even if you’re planning on peeling them, because any bacteria on the surface can be transferred to the inside. Make sure you rinse off fresh herbs, too—almost a quarter of herbs such as basil, cilantro, and parsley tested positive for E. coli, according to a 2014 University of Washington study published in the Journal of the Science of Food and Agriculture. Just dry them if you’re not using them right away, because moisture can encourage bacteria to grow, Cutter says.

It’s also a good idea to invest in a meat thermometer to ensure that food is cooked enough to kill disease-causing bugs. Whole cuts of beef should be cooked to an internal temperature of 145° F, ground beef to 160° F, and poultry to 165° F. “This way, even if some of the food you do bring home from the farmers market contains bacteria, you’re making sure you kill it before you consume it,” Cutter says.