The 35-year-old schoolteacher, during a hearing told the court that her digestive system sometimes converts food into alcohol.

After her arrest, her doctor conducted tests that found that high levels of yeast in her intestines ferment high-carbohydrate foods.

Prosecutors are seeking to have the charges against the woman reinstated.

"She can register a blood alcohol content that would have you or I falling down drunk, but she can function," her lawyer Joseph Marusak told the Buffalo News.

Mr Marusak declined to name his client, citing medical confidentiality laws.

The actual arrest took place near Buffalo in October 2014 after police said she was driving erratically. A Breathalyzer test showed that her blood-alcohol level more than four times the legal limit.

The arresting officer said she failed several field sobriety tests.

Medical and legal experts say the condition, also known as gut fermentation syndrome, is being raised more frequently as a defence in drink-driving cases.

The rare medical condition is one in which intoxicating quantities of ethanol are produced through endogenous fermentation within the digestive system. According to experts, one gastrointestinal organism, Saccharomyces cerevisiae, a type of yeast, has been identified as a pathogen for this condition.

The effects of the disease can have profound effects on everyday life. As well, the recurring side effects of dizziness, dry mouth, hangovers, disorientation, irritable bowel syndrome, and chronic fatigue syndrome can lead to other health problems such as depression, anxiety and poor productivity in employment. The random state of intoxication can lead to personal difficulties, and the relative obscurity of the condition can also make it hard to seek treatment.

It appears that several people charged with drunk driving are now trying to escape culpability by raising this defense.

"At first glance, it seems like a get-out-of-jail-free card," Jonathan Turley, a law professor at George Washington University, told the Associated Press.

"But it's not that easy. Courts tend to be skeptical of such claims. You have to be able to document the syndrome through recognized testing."

Usually the effects of the condition can be alleviated through a special very low-carbohydrate diet.