Compound in artificial sweetener Truvia can kill fruit flies, researchers have found.

According to researchers at Drexel University, Erythritol, the main ingredient in Truvia, is toxic to Drosophila melanogaster.

Erythritol is a natural sugar and is present in low doses in several types of fruits. The compound was approved by the Food and Drug Administration as a food additive in 2001. The latest study suggests that the sweetener can be used to fight common pests without polluting the environment.

The study started out as middle-school science project. Simon Kaschock-Marenda began the research on Truvia's effects on fruit flies along with his father Daniel Marenda, a biology professor at Drexel.

The father-son team tested fruit fly's longevity in the presence of different types of sugar substitutes. They found that flies exposed to Truvia had shorter lifespans than flies that grew up using Splenda, Equal, Sweet'N Low or Pure Via, Livescience reported.

Lifespan of fruit flies under normal conditions was found to be about 38 to 51 days. When exposed to erythritol, these flies lived for just 5.8 days. The sugar substitute also impaired the flies' motor functions.

"Indeed what we found is that the main component of Truvia®, the sugar erythritol, appears to have pretty potent insecticidal activity in our flies," Marenda said in a news release.

After additional research at a laboratory, researchers found that fruit flies preferred Erythritol over table sugar.

The team found that high concentration of erythritol; about 2.4 grams in 10 milliliters of water, killed the fruit flies in just two days, Livescience reported.

Researchers haven't found how the sugar substitute affects the fruit flies' lifespan or if the compound is toxic to other insects.

"We are not going to see the planet sprayed with erythritol and the chances for widespread crop application are slim," Sean O'Donnell, a professor of biology at Drexel University in Philadelphia, one of the study authors, said. "But on a small scale, in places where insects will come to a bait, consume it and die, this could be huge."

The study is published in the journal PLOS One.