“Nutrition research is where heart attack research was,” Dr. Lauer said. Patients in those days were advised to stay in bed for four to five weeks and take lidocaine to normalize their hearts’ rhythms and nitroglycerin to open blood vessels.

But it turned out that treatment actually hastened death. It took years to find the answers, but eventually, Dr. Lauer said, dozens if not hundreds of large clinical trials radically transformed heart attack treatment.

But when it comes to diet and heart disease, doctors — and patients — have been going on hunches.

The new study could be a start in changing all that, heart researchers said.

It involved 7,447 people in Spain, half of whom were randomly assigned to follow a Mediterranean diet and the rest to follow the sort of standard low-fat diet that cardiologists often prescribe. It was ended early after less than five years because those on the Mediterranean diet had 30 percent fewer heart attacks, strokes and deaths from heart disease compared with people in the control group, who ate more or less the same way that they always had. They had been instructed to follow a low-fat diet but had not been able to comply.

Dr. Ramón Estruch of the University of Barcelona, the lead author of the study, said that although some had thought people would never allow their diets to be decided by a figurative toss of a coin, it was not hard to get people to switch to a Mediterranean diet.

“They wanted to eat the way their grandfathers ate,” he said. Most study participants actually thought they were already eating that way. They learned they were not after answering questions about, for example, how often they ate red meat versus fish.