Pasta. Sourdough. Mashed potatoes. If you are one of the legions of dieters out there who have been religiously cutting carbs in an attempt to get lean and fit, you may be surprised by a recent study that showed that low carb diets may not be healthy after all. In fact, they may be unsafe.

Research presented at the European Society of Cardiology Congress in Germany found that diets very low in carbohydrates may actually increase the risk of premature death over time. Yikes.

The author of the study, Professor Maciej Banach, of the Medical University of Lodz, Poland, said: “We found that people who consumed a low carbohydrate diet were at greater risk of premature death. Risks were also increased for individual causes of death including coronary heart disease, stroke, and cancer. These diets should be avoided.”

The study — which has not been published in a peer-reviewed journal — used diet and health data from almost 25,000 people collected through the National Health and Nutrition Examination Survey between 1999 and 2010, according to Time. The researchers found that over an average of 6.4 years of follow-up, people who consumed the lowest amount of carbohydrates had a 32 percent higher risk of total mortality, a roughly 50 percent higher risk of dying from vascular diseases and a 36 percent higher risk of dying from cancer, compared to people who ate the most carbs.

As Banach said: “Low carbohydrate diets might be useful in the short term to lose weight, lower blood pressure, and improve blood glucose control, but our study suggests that in the long-term they are linked with an increased risk of death from any cause, and deaths due to cardiovascular disease, cerebrovascular disease, and cancer.”

Part of the problem may be that people who eliminate carbs might be pigging out on high fat foods instead. As Despina Hyde, a registered dietitian at NYU Langone’s Weight Management Program, told Time: “When you’re not eating carbs, you have to eat something. We tend to eat higher protein and higher fat (on a low-carb diet),” Hyde says. Plus, “carbohydrates are the only source we have of fiber, and fiber is great for reducing risk of breast cancer, lowering our cholesterol and making us feel full for longer.”

Apparently it’s possible to have too much or too little carbohydrate in your life.

“These findings bring together several strands that have been controversial,” co-author Walter Willett at Harvard T. H. Chan School of Public Health said in a statement that USA Today cited. “Too much and too little carbohydrate can be harmful but what counts most is the type of fat, protein, and carbohydrate.”

Although it’s not a sexy answer, the best path may well be moderation. Eating carbs is good for us, as long as we are choosing good carbs. Think black beans, fruit, quinoa and whole grains. You can feel free to cut back on stuff like white bread, white pasta and cookies.