You’re feeling depressed. What have you been eating?

Psychiatrists and therapists don’t often ask this question. But a growing body of research over the past decade shows that a healthy diet—high in fruits, vegetables, whole grains, fish and unprocessed lean red meat—can prevent depression. And an unhealthy diet—high in processed and refined foods—increases the risk for the disease in everyone, including children and teens.

Now recent studies show that a healthy diet may not only prevent depression, but could effectively treat it once it’s started.

Researchers, led by epidemiologist Felice Jacka of Australia’s Deakin University, looked at whether improving the diets of people with major depression would help improve their mood. They chose 67 people with depression for the study, some of whom were already being treated with antidepressants, some with psychotherapy, and some with both. Half of these people were given nutritional counseling from a dietitian, who helped them eat healthier. Half were given one-on-one social support—they were paired with someone to chat or play cards with—which is known to help people with depression.

After 12 weeks, the people who improved their diets showed significantly happier moods than those who received social support. And the people who improved their diets the most improved the most. The study was published in January 2017 in BMC Medicine. A second, larger study drew similar conclusions and showed that the boost in mood lasted six months. It was led by researchers at the University of South Australia and published in December 2017 in Nutritional Neuroscience.