FORTUNE – Bad gasoline is not a myth. Sediment and water from runoff can enter underground holding tanks at gas stations through loosely tightened or worn-out fuel caps, explains Ronald Hayes, who oversees fuel inspections for the state of Missouri. And most gasoline now contains 10% ethanol, a biofuel that absorbs water and mixes it in with petroleum, adds Clark Cooney, a fuel quality expert at the Oregon Measurement Standards Division. Filters at the pump catch larger particles of sediment before they enter a car’s tank, but smaller particles and water that get through can keep combustion engines from running smoothly.
In May a Florida TV news team found sediment in gasoline purchased at two West Palm Beach-area service stations, prompting state inspectors to temporarily shut down the offending pumps. Fuel quality inspections are not federally mandated, and although most states periodically test for contaminants, inspections may be more than a year apart, and not all stations may get tested every time. If you get a bad batch of gas your ride will feel jerky, your “Check Engine” light will likely go on, and your engine may cut out. You could have to spend hundreds of dollars to get your car towed, hoses replaced, and gas tank emptied.
More: 6 green cars that don’t live up to the hype
“This is a retail product, so most of the branded, big-name stations have a fairly comprehensive quality control process set up because they want to sell their product,” says Jason Barber, who heads up Oregon’s inspection program. But going to a pricier gas station doesn’t guarantee you’ll get good gas — Hayes’s inspectors have found contaminated fuel at expensive pumps across Missouri. He says consumers should contact their state’s Bureau of Weights and Measures with complaints; service stations often don’t know that the problem exists, and they’ll pony up for damages if testing confirms you had a case of bad gas.
A shorter version of this story originally appeared in the August 13, 2012 issue of Fortune.