Eating fried food may be bad for your waistline, but it turns out if olive oil is used to fry up those tasty bits, they may not have a harmful effect on your heart.

Researchers at the Autonomous University of Madrid surveyed more than 40,000 adults about their diet, asking questions about what types of food they ate in a typical week and how that food was prepared and cooked.

None of the adults had any sign of heart disease at the start of the 11-year study, and by the end, 606 heart disease events and 1,134 deaths had occurred — but when the researchers looked at this data in detail, they found no link to fried food in the participants’ diets.

This led them to believe the type of oil in which the food is cooked matters.

In an accompanying editorial to the report in BMJ, Professor Michael Leitzmann from the University of Regensburg in Germany said, “Taken together, the myth that frying food is generally bad for the heart is not supported by available evidence … The study suggests that specific aspects of frying food are relevant, such as the oil used, together with other aspects of the diet.”

Victoria Taylor, a senior heart health dietitian at the British Heart Foundation, said it’s important to remember the study was conducted in Spain, where a heart-healthy Mediterranean diet tends to be followed, and that the results may have been different if people from other countries had been involved.

“Participants in this study used unsaturated fats such as olive and sunflower oil to fry their food,” she told BBC News. “We currently recommend swapping saturated fats like butter, lard or palm oil for unsaturated fats as a way of keeping your cholesterol down and this study gives further cause to make that switch.”

Still, she added, “Regardless of the cooking methods used, consuming foods with high fat content means a high calorie intake. This can lead to weight gain and obesity, which is a risk factor for heart disease. A well-balanced diet, with plenty of fruit and veg and only a small amount of high fat foods, is best for a healthy heart.”

More From WFNT