“Because the patient died, you can’t assume that the treatment and therapies were not of value,” said Dr. Peter B. Bach of Memorial Sloan-Kettering Cancer Center. “Although in that individual, things may not have worked out, you have no insight into whether the decision to operate was appropriate.” Nor is it known how many similar patients who had that same surgery did not die.

But the sheer number of operations at the end of life was unexpected, said the researchers, at Harvard School of Public Health. They added that they did not know why the operations had been done. Some undoubtedly were necessary to relieve pain and suffering or to prolong life. But, they said, they know from experience that doctors often operate to repair something that can be fixed but that will not save a dying patient, avoiding the difficult discussions with patients about their prognosis and whether the surgery will improve or compromise their quality of life.

In their study, published Wednesday in The Lancet, the investigators analyzed data for all the 1,802,029 Medicare recipients 65 and older who died in 2008. In addition to the number of operations nationally, they reported marked regional variations in the use of surgery at the end of life. For example, the rate of surgery in Honolulu was a third of that in Gary, Ind.

“Honolulu and Gary, Ind., can’t both be doing it right,” said Dr. Ashish Jha, an associate professor of health policy at Harvard and the lead author of the study.

But regional variations in health care have been controversial because it is not clear whether they reflect true differences in patient needs or in health care practices or regional differences in health care payment rules, Dr. Bach said.