Think you're at risk of getting diabetes? Then eat a pistachio, or 10 or 20 -- because they might be the key to lowering your blood sugar and insulin levels, says new research out of Spain.

Researchers from the Universitari Hospital of Sant Joan de Reus, in Reus, and the Instituto de Salud Carlos III in Madrid collaborated on the trial, which found people with prediabetes and who ate about two ounces of pistachios daily showed significant drops in blood sugar and insulin levels and improvements in insulin and glucose processing. Some signs of inflammation also significantly decreased, according to a report by Reuters Health.

The research was funded by the American Pistachio Growers and Paramount Farms and published in the journal Diabetes Care.

People identified with prediabetes have blood sugar levels higher than normal but not yet in the range of diabetes.

That said, if those prediabetic individuals do nothing to improve their conditions, an estimated 15 to 30 percent of them will develop diabetes within five years, according to the United States Centers for Disease Control and Prevention.

The study team divided 54 prediabetic adults into two groups, both of which were told to keep to a calorie-regulated diet with 50 percent of energy from carbohydrates, 35 percent from fat and 15 percent from protein, using provided menus and seasonal recipes, the Reuters Health story explained.

Each day, one group was given 57 grams of pistachios, or about two ounces, to add to their diets. To match the calories from the pistachios, the comparison group added olive oil and other fats to their diet, through the four-month duration of the study.

By the end of the research trial, fasting blood sugar levels, insulin and hormonal markers of insulin resistance had decreased in the pistachio group while rising in the comparison group.

The weight of participants did not significantly change by the end of the study in either group. And yet, glucose-use by immune cells involved in inflammation, as well as circulating inflammatory signaling molecules, both dropped in the pistachio group, the authors note.

"Although pistachios were examined in this work, I believe that any beneficial effects on glucose metabolism are shared by all nuts, as they have a general composition with lots of bioactive compounds liable to beneficially affect biological pathways leading to insulin resistance and diabetes," Emilio Ros, director of the Lipid Clinic of the Endocrinology and Nutrition Service at Hospital Clínic in Barcelona, explained to Reuters Health. He was not part of the new study.

"This particular study builds on previous research on pistachios," Joan Sabate, a professor of nutrition and epidemiology at the School of Public Health at Loma Linda University in California, told Reuters Health.

"There are some indications that eating pistachios on a regular basis lowers fasting glucose and lowers insulin and hormone ratio, which is particularly relevant in prediabetic subjects because unless they do a change in lifestyle they will end up being diabetic," he said. "So the fact that eating nuts on a regular basis seems to improve some of the critical parameters is very relevant."