Police and doctors didn’t believe a 46-year-old man who swore that he hadn’t had alcohol before he was arrested on suspicion of drunken driving.

His blood alcohol level was 0.2, more than twice the legal limit for operating a car. He refused a breathalyzer test, was hospitalized and later released. But the facts remained in contention.

Then researchers discovered the unusual truth: Fungi in the man’s digestive system was turning carbohydrates into alcohol – a rarely diagnosed condition known as “auto-brewery syndrome.”

In people with the syndrome, fermenting fungi or bacteria in the gut produce ethanol and can cause the patients to show signs of drunkenness. The condition, also known as gut fermentation syndrome, can occur in otherwise healthy people but is more common in patients with diabetes, obesity or Crohn’s disease.

“A person is intoxicated from this fermenting yeast, and it’s a horrible illness,” said Barbara Cordell, a researcher of auto-brewery syndrome and the author of “My Gut Makes Alcohol.”

The condition has rarely been studied and is diagnosed infrequently. Researchers at Richmond University Medical Center in New York, however, wrote in the journal BMJ Open Gastroenterology that they believe the syndrome is underdiagnosed.

The condition made news in 2014, when the driver of a truck that spilled 11,000 salmon onto a highway claimed to have auto-brewery syndrome. The next year, a New York woman was charged with driving under the influence after she registered a blood alcohol level that was more than four times the legal limit, CNN reported. A judge dismissed the charges after being shown evidence that she had auto-brewery syndrome.

The man in the Richmond University study, whose identity was not released, had started taking antibiotics in 2011 for a thumb injury. That’s when the weird symptoms started: depression, memory problems and aggressive behavior that was uncommon for him.

“Everybody thought that he was a liar, he was a closet drinker,” said Fahad Malik, the lead researcher on the study.

After his arrest on a drunken-driving charge, the man’s aunt remembered hearing about a similar situation addressed by a doctor in Ohio. She bought her nephew a tool to test his blood alcohol levels and persuaded him to get treatment.

Doctors there gave the man a carbohydrate-heavy meal and watched his blood alcohol level shoot up to 0.57. He left on strict orders not to eat carbs – commonly found in bread, pasta and beer, among other foods – but soon started having flare-ups again. When his intoxication at one point caused him to fall and suffer a brain bleed, the doctors again refused to believe that he hadn’t been drinking.

The man contacted the authors of the study, which was published in August. They prescribed him an antifungal drug that got rid of his symptoms until he relapsed from eating pizza and drinking soda. Doctors eventually found a combination of treatments that, combined with regular checks of his blood alcohol level, enables the man to stick to a normal diet without exhibiting symptoms.

People with auto-brewery syndrome may smell like alcohol or feel too tired to work or spend time with family. Some patients are unemployed because of the condition, Malik said, and others skip meals to be sober for longer periods.

Nick Hess, 39, said his auto-brewery syndrome makes him oscillate each day between intoxication and a hangover. He said he had to drop out of college because of his symptoms and is appealing a DUI conviction. He suffers from vomiting, headaches and other symptoms every day.

Hess, of Columbus, Ohio, said his wife didn’t believe that he hadn’t been drinking when he started exhibiting symptoms. At one point, he said, she started recording him to ensure he wasn’t sneaking alcohol. What she saw, Hess said, was just him playing video games all day.

“She would watch me wake up and sit on that couch from the moment I woke up to the moment I went to sleep and progressively get more and more drunk,” he said.

Cordell said her husband had auto-brewery syndrome for six years before they discovered why he sometimes slurred his words and lost coordination. If he ate a carb-heavy food such as ice cream at night, Cordell said he usually showed signs of intoxication by the next afternoon.

Auto-brewery syndrome seems to be caused by antibiotic use altering a person’s fungal growth, but Cordell said researchers don’t know why few people who take antibiotics contract the condition. Other drugs, environmental toxins or preservatives in foods also could cause auto-brewery by disrupting the body’s normal balance of bacteria.

Early symptoms of auto-brewery syndrome may be mood changes, brain fog and delirium, instead of signs of intoxication, according to the Richmond study. Some symptoms of auto-brewery syndrome can mimic other conditions or medical events, such as hypoglycemia or a stroke, Cordell said. She recommends that people who suspect they have auto-brewery test their blood alcohol levels when symptoms manifest.

If someone becomes seriously intoxicated from auto-brewery, Cordell recommended first seeking treatment for the potential alcohol poisoning. Blood alcohol levels in people with auto-brewery can reach five times the legal limit, she said. Antifungal medications, probiotics and low-carb diets can treat the condition.

Cordell runs a support group for about 200 people with auto-brewery syndrome and said roughly 500 people from around the world have contacted her about the condition since 2015.

“I think there are a lot more people suffering than we even know,” she said.