Gina Kolata / New York Times News Service

This is a watershed moment in the field of nutrition, medical experts say. For the first time, researchers have shown that a diet can have an effect as powerful as drugs in preventing what really matters to patients — heart attacks, strokes and deaths from cardiovascular disease.

The subjects were people at high risk of heart disease, and the diet was a Mediterranean one, high in olive oil or nuts.

The study, published in the newest New England Journal of Medicine, is now shaking up the field of cardiovascular medicine, infusing it with optimism. Scientists are calling for similarly rigorous studies of other popular diets that are routinely recommended by cardiologists even though there is little solid evidence that they work.

“We don’t know what the best diet is,” said Dr. Michael Lauer, the director of the division of cardiovascular sciences at the National Heart, Lung and Blood Institute. “This is a great opportunity to come together and use power of the scientific method to get closer to the right answer.”

The National Heart, Lung and Blood Institute is supporting a large clinical trial to see if fish oil and vitamin D can prevent heart attacks and cardiovascular deaths. But while that is important, heart experts say it is time to also look at diets as a whole.

Dr. Lawrence Appel, a professor of medicine at Johns Hopkins who was a member of the 2005 and 2010 U.S. dietary guidelines committees, said he was inspired by the Mediterranean diet study.

“Can we do a trial of fruits and vegetables?” he asked. “I think we can.”

The situation in nutrition today reminds Lauer of an era in the 1950s when doctors struggled to figure out how best to treat heart attack patients.

“Nutrition research is where heart attack research was,” 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, 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. 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 they always had.

Dr. Ramon 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.”

Estruch said he and his colleagues were so buoyed by the success of their study that they were planning another one.

But for now, chaos reigns. The public is bombarded with diet advice, often contradictory and lacking a rigorous scientific grounding, medical experts said.

“Diets are an extreme case of accepting evidence we want to believe,” said Dr. J. Sanford Schwartz, a professor of medicine at the University of Pennsylvania. That includes doctors, he added, who overlook that the evidence for the low-fat diets they often recommend is the sort “we would never accept in the practice of medicine.”

Those low-fat diets sound sensible: Eat fruits and vegetables, fish and lean meats. Cut back on and sugar-laden sodas and salty potato chips. Cut or sharply limit most fats, including olive oil and nuts. But such diets have not been tested in the way the Mediterranean diet was tested.

Doctors are in a bind, said Dr. Daniel Rader, a heart disease specialist at the University of Pennsylvania. When patients ask what to eat, he said, “you have to give them something.”