Both low-carb and low-fat diets can lead to weight loss, but which is better for heart health?

It all depends on what you’re eating while following those regimens, experts say.

Consuming too much protein, for example, or replacing fat with sugar and refined carbs won’t lead to a healthier body.

But three types of foods in particular can be part of either diet and can protect the heart.

Cardiologist Tip of the Day: Focus on Quality Foods for Heart Health

Eating either a low-fat or a low-carb diet that’s rich in three things — plant-based foods, whole grains and unsaturated fats — is associated with a reduced risk of coronary heart disease, a recent study published in the Journal of the American College of Cardiology found.

Diet quality plays a “critical role” no matter which macronutrients an eating plan emphasizes, the authors noted.

“The study confirms what we’ve learned over the last 20 years,” Dr. Dariush Mozaffarian, a cardiologist and director of the Food is Medicine Institute at Tufts University, told NBC News.

Rather than focusing on fat, carbohydrates or protein, it’s the quality of the foods that can lower heart disease risk, he added.

Why It Matters

Coronary heart disease happens when fatty cholesterol deposits build up in the heart arteries, narrowing and hardening them, and limiting how much oxygen-rich blood reaches the heart muscle. It can ultimately lead to a heart attack.

The disease is largely preventable with lifestyle choices, including eating healthy foods, the National Heart, Lung and Blood Institute notes.

Quality foods to eat on either a low-fat or a low-carb diet include nutrient-dense foods, such as fruits, vegetables, whole grains, nuts and legumes, Kristina Petersen, an associate professor of nutritional science at Penn State who studies diet and risk of cardiovascular disease, told NBC News.

Eat fewer foods that are higher in added sugar, saturated fat and salt, she added.

How to Get Started

Dietitians recommend these healthy plant-based foods to add to any diet: beans, sweet potatoes, kimchi, nuts, peanut butter, farro and tofu.

There’s a variety of whole grains to try, from whole wheat bread and brown rice to corn, quinoa and oats.

Foods high in unsaturated fats include extra virgin olive oil, walnuts and avocados.

Download the Start TODAY app for healthy meals plans and recipe ideas that fit any eating plan.

TODAY’s Expert Tip of the Day series is all about simple strategies to make life a little easier. Every Monday through Friday, different qualified experts share their best advice on diet, fitness, heart health, mental wellness and more.