An operation that doctors hoped would prevent strokes in people with poor circulation to the brain does not work, researchers are reporting. A $20 million study, paid for by the government, was cut short when it became apparent that the surgery was not helping patients who had complete blockages in one of their two carotid arteries, which run up either side of the neck and feed 80 percent of the brain.

The surgery was a bypass that connected a scalp artery to a deeper vessel to improve blood flow to the brain.

The new study, published on Wednesday in The Journal of the American Medical Association, is the second in recent months to find that a costly treatment, one that doctors had high hopes for, did not prevent strokes. In September, researchers reported that stents being used to prop open blocked arteries deep in the brain were actually causing strokes. That study was also cut short.

Both the stents and the bypass operation seemed to make sense medically, and doctors thought they should work. Their failure highlights the peril of assuming that an apparent improvement on a lab test or X-ray, like better blood flow or a wider artery, will translate into something that actually helps patients, warned an editorial that accompanied the new findings. Only rigorous studies can tell for sure.