(CNN) When a man in North Carolina was pulled over on suspicion of driving drunk, police didn't believe him when he said he hadn't had any alcohol.

The man, in his late 40's at the time, refused to take a breathalyzer test and was taken to a hospital, where his initial blood alcohol level was found to be 0.2% — about 2.5 times the legal limit and the equivalent of consuming 10 drinks an hour. Despite the man swearing up and down that he hadn't had anything to drink, doctors didn't believe him either.

But researchers at the Richmond University Medical Center in New York eventually discovered that the man was telling the truth. He wasn't downing beers or cocktails — instead, there was yeast in his gut that was likely converting carbohydrates in the food he ate to alcohol.

In other words, his body was brewing beer.

The findings were reported in a study in BMJ Open Gastroenterology . The man, whose identity has not been revealed, had a rarely diagnosed medical condition called auto-brewery syndrome (ABS), also known as gut fermentation syndrome.

Gut fermentation syndrome occurs when yeast in the gastrointestinal tract causes the body to convert carbohydrates ingested through food into alcohol. The process typically takes place in the upper GI tract, which includes the stomach and the first part of the small intestine.

"These patients have the exact same implications of alcoholism: the smell, the breath, drowsiness, gait changes," Fahad Malik, the study's lead author and the chief internal medicine resident at the University of Alabama at Birmingham, told CNN. "They will present as someone who's intoxicated by alcohol, but the only difference here is that these patients can be treated by antifungal medications."

Researchers treated him with antifungal medications

Things weren't the same for the man after he completed a course of antibiotics to treat a thumb injury. His personality started to change, researchers wrote in the study, and he experienced episodes of depression, 'brain fog,' memory loss and aggressive behavior that was out of character for him.

Three years later, after his suspected drunk driving arrest, the man's aunt bought a breathalyzer to record his alcohol levels. She had heard about a similar case that had been successfully treated by a doctor in Ohio and convinced her nephew to seek treatment there too.

His basic lab tests turned out normal. But doctors found two strains of yeast in his stool: Saccharomyces cerevisiae, a yeast commonly used in beer brewing, winemaking and baking, as well as another fungus.

The man was successfully treated at the Ohio clinic and told to stick to a strict carbohydrate-free diet along with some special supplements. But after a few weeks, his symptoms started to flare up again. This time, no treatment seemed to work despite visits to numerous medical professionals.

At one point, the man became so inebriated that he fell and experienced bleeding in his brain. He was taken to a neurosurgical center where he spontaneously recovered in 10 days, researchers said.

"In this institution, his blood alcohol levels ranged from 50 to 400 mg/dL," the researchers wrote. "Here too, the medical staff refused to believe that he did not drink alcohol despite his persistent denials."

Finally, the man sought help from an online support group and got in touch with the researchers at the Richmond University Medical Center, who said in the study that they believed the antibiotics he took years ago altered his gut microbiome and allowed fungi to grow in his gastrointestinal tract.

The researchers then used antifungal therapies and probiotics to help normalize the bacteria in his gut, a treatment that he has continued. And aside from one relapse that occurred after he binged on pizza and soda without telling the researchers, it seems to be working.

And he can eat pizza again.

"Approximately 1.5 years later, he remains asymptomatic and has resumed his previous lifestyle, including eating a normal diet while still checking his breath alcohol levels sporadically," the authors wrote in the study.

The condition is rarely diagnosed

There have only been a few studies documenting cases of gut fermentation syndrome and the condition is rarely diagnosed, Malik said. In the past, it's even been regarded as a myth.

Gut fermentation syndrome was described in 1912 as "germ carbohydrate fermentation," and was studied in the 1930s and 1940s as a contributing factor to vitamin deficiencies and irritable bowel syndrome. A group of 20 to 30 cases popped up in Japan in the 1970s and the first US cases were reported about 10 years later.

There have been a handful of reported cases in recent years. A 2013 study described a case of a 61-year-old man who for years seemed to be drunk all the time before he was diagnosed with gut fermentation syndrome. In 2015, a woman in upstate New York had a DUI dismissed after presenting evidence that she had the condition.

The authors of the Richmond University Medical Center study recommend that doctors investigate for the condition especially when a patient shows elevated blood alcohol levels despite denying that they consumed alcohol.

Early signs of gut fermentation syndrome can include mood changes, delirium and brain fog, the researchers wrote, even before a patient starts exhibiting symptoms of alcohol inebriation.

The study says more research should be done on the use of probiotics as a treatment for the condition.

"This is a condition that is treatable with dietary modifications, appropriate antifungal therapy, and possibly probiotics," the researchers wrote. "The use of probiotics and faecal microbiota transplantation could be considered for future studies."