Adding a little dark chocolate to a training diet may effortlessly improve endurance performance, according to a new study of sports nutrition. The findings provide ammunition both for athletes looking for an edge and those hoping for an excuse to indulge.

For some time, dark chocolate has been touted as a relatively healthy treat, with studies showing that small amounts may have benefits for the heart and brain. Most of this research has focused on the role of a substance called epicatechin, a plant nutrient found in cocoa. Dark chocolate is generally rich in epicatechin, though levels vary, depending on how the sweet was produced. Levels of epicatechin tend to be much lower in milk chocolate, which contains little cocoa, and white chocolate contains little or none of the nutrient.

Epicatechin is known to prompt cells that line blood vessels to release extra nitric oxide, a substance that has multiple effects in the body. Nitric oxide slightly increases vasodilation, or a widening of the veins and arteries, improving blood flow and cardiac function. It also gooses muscle cells to take in more blood sugar, providing them with more energy, and it enhances the passage of oxygen into cells.

Because of its many physiological effects, each of which can aid physical performance, athletes long have looked for ways to increase the amount of nitric oxide in their bloodstreams. Some down supplement pills, although the benefits of nitric oxide supplements are unproven. Others swallow beetroot juice, a beverage that contains a hefty dose of nitrates, which then break down in the body into nitric oxide and other substances. There are questions, however, about the safety of nitrates and also, as anyone who has tried beetroot juice will tell you, the palatability of a beverage that tastes distinctly like liquid dirt.

Surprisingly, athletes and scientists have devoted relatively little attention to the potential of dark chocolate as a way to up natural nitric oxide and subsequent performance, perhaps in part because chocolate can cause weight gain and also seems neither medicinal nor unpleasant, two attributes often associated with ergogenic aids.

But researchers at Kingston University in England suspected that dark chocolate might be a potent performance enhancer, if the chocolate were deployed carefully.

So for the new study, which was published in December in The Journal of the International Society of Sports Nutrition, they found eight male recreational cyclists who agreed, in the interests of science, to swallow a little dark chocolate every day.

The cyclists first, however, visited the researchers’ lab for tests of their fitness and oxygen uptake during moderate rides and all-out sprints on a stationary bicycle.

Then the scientists provided half of the cyclists with 40 grams (1.4 ounces, or about one and a half squares) per day of Dove brand dark chocolate, which has been found in past tests to contain an above-average amount of epicatechin.

The cyclists were told to replace one of their normal snacks or desserts with the chocolate, to avoid weight gain.

The other cyclists were provided with 40 grams of white chocolate, as a control.

They all ate their chocolate every day for two weeks, then returned to the lab to repeat the tests.

Then each group was provided with whichever type of chocolate, white or dark, they had not eaten before and sent off for another two weeks.

They returned and repeated the cycling and oxygen uptake tests again.

The results were beguiling. Each of the cyclists performed better in most of the physical tests after two weeks of supplementing with dark chocolate, compared to baseline results and after they had eaten white chocolate. The riders utilized less oxygen to ride at a moderate pace, a change that would generally allow them to ride longer or harder before tiring; and they covered more distance during a two-minute, all-out time trial, meaning that their anaerobic, sprinting ability had been enhanced.

The researchers did not directly measure nitric oxide in their volunteers’ blood, but believe that the chocolate ramped up production of the substance, improving oxygen delivery to riders’ cells.

Performance gains were not huge. The riders who had eaten dark chocolate covered an additional tenth of a mile during the two-minute time trial compared to when they had white chocolate. But that extra mileage occurred, the scientists point out, even though the riders otherwise followed the same dietary and training regimens during each of the two-week sessions.

The upshot of these findings would seem to be that “recreational athletes who would like to improve their performance” might consider swapping a daily cookie or soda for a square or two of dark chocolate, said Rishikesh Kankesh Patel, a graduate student at Kingston University who led the study.

But he cautioned that scientists do not yet know the ideal dosage of dark chocolate for athletes, and that more than 40 grams is unlikely to be helpful, so put away the rest of that bar. Cocoa and epicatechin levels also vary widely from bar to bar, he said, which makes precise dosing of the performance-enhancing content tricky.

Correction: March 23, 2016An earlier version of this article misstated the amount of white chocolate given to the control group. It was 40 grams, not 40 ounces.

Correction: April 1, 2016The Phys Ed column on Tuesday about dark chocolate and athletes’ diets misstated part of the name of the journal in which the study was published. It is The Journal of the International Society of Sports Nutrition, not The Journal of the International Society of Sports Medicine.

A version of this article appears in print on 03/29/2016, on page D4 of the NewYork edition with the headline: A Workout Aid That You Crave.