Researchers analyzed data from more than 65,000 patients aged 65 and older who were treated for pneumonia at Veterans Administration hospitals between 2002 and 2012. About half of them received azithromycin and half did not.

Ninety days after hospital admission, death rates were just over 17 percent for patients in the azithromycin group and about 22 percent in the other group. The patients who received azithromycin had a slightly higher risk of heart attack (5.1 percent versus 4.4 percent), but nearly the same risk for any cardiac event (about 43 percent), heart rhythm disorders (about 26 percent) and heart failure (26 percent), the investigators found.

For every 21 patients treated with azithromycin, one death was prevented within 90 days, while for every 144 patients treated with the antibiotic, there was one heart attack, said Dr. Eric Mortensen, of the VA North Texas Health Care System and University of Texas Southwestern Medical Center at Dallas, and colleagues.

This means that the use of azithromycin prevents about seven deaths for every heart attack it causes, according to the authors of the study published in the June 4 issue of the Journal of the American Medical Association.

Guidelines for patients hospitalized with pneumonia recommend combination therapy with a class of antibiotics called macrolides, including azithromycin, as first-line treatment. However, recent research has suggested that azithromycin may increase the risk of cardiovascular events, according to background information in the study.

Pneumonia and influenza together are the eighth most common cause of death and the leading cause of infectious death in the United States.