For more than two decades, apparently healthy children in the Indian region of Bihar suffered sudden seizures and lost consciousness. A third of them died, leaving doctors baffled.

But a team of American and Indian scientists say they have found the cause of the mystery illness, which killed more than 100 children a year: eating too many lychees on an empty stomach.

The research, published in medical journal The Lancet, has found lychees — particularly unripe fruits — contain an amino acid that affects blood glucose levels.

"Parents in affected villages report that during May and June, young children frequently spend their day eating lychees in the surrounding orchards; many return home in the evening uninterested in eating a meal," the researchers wrote, saying most children then arrived at hospital unconscious or having seizures in the middle of the night or early morning.

In South-East Asia, outbreaks of similar illnesses have been reported from lychee-growing areas of Bangladesh and Vietnam.

How has this link not been made before?

The researchers said the lychee's potential toxic effects were noted in ancient literature from China, where the fruit originates, however the commercial lychee industry in India is relatively young and has expanded quickly.

"This knowledge has been slow to reach certain parts of Asia where the so-called mysterious lychee disease has been attributed to various causes (fruit colouring, heat stroke) in Bihar, India, to an unidentified pesticide in north-west Bangladesh and, after an exhaustive negative virological search, to a yet-to-be-discovered neurotropic virus in northeast Vietnam," Professor Peter Spencer and Dr Valerie Palmer wrote in a Lancet paper discussing the research.

The amino acid found to be the culprit is found in the fruit of many members of the Soapberry family, which also includes the lychee, along with rambutan, longan and ackee.

To guard against the illness, the researchers recommended minimising lychee consumption and making sure children had an evening meal.

The children's age and state of nourishment were also factors.

If a child did become ill, the researchers said they should be treated quickly to correct their glucose levels to prevent lasting damage such as mental impairment, muscle weakness and movement disorders.

"Fortunately, the high cost of these imported fruits and the likelihood that would be eaten in small quantities by well-nourished consumers, suggests there is little reason for concern in the USA," Professor Spencer and Dr Palmer noted.

However, lychee production is increasing in Australia.

The researchers also said there were now studies looking at how to put the lychee's glucose-lowering properties to good use in treating metabolic syndrome.