TORONTO -- A new study says older patients who take a commonly prescribed antibiotic with a diuretic widely used to treat heart failure can have an elevated risk of sudden cardiac death.

The study found that combining the antibiotic trimethoprim-sulfamethoxazole and the heart drug spironolactone more than doubles the risk of sudden cardiac death compared with the antibiotic amoxicillin.

Both trimethoprim-sulfamethoxazole and spironolactone raise blood potassium. Together they can cause a dangerously high level of potassium called hyperkalemia that can cause sudden death from an irregular heart rhythm.

Researchers at the Institute for Clinical Evaluative Sciences and St. Michael's Hospital in Toronto looked at almost 12,000 patients aged 66 and older who suddenly died while taking the diuretic over a 17-year period.

They found 328 of the deaths occurred within 14 days of antibiotic exposure, and trimethoprim-sulfamethoxazole was linked to a two-fold increased risk of sudden death compared with amoxicillin.

There was also a less pronounced risk of sudden cardiac death for those taking the antibiotic ciprofloxacin, and no risk associated with norfloxacin.

"Sudden out-patient death from hyperkalemia is often misattributed to heart disease, particularly in older patients," said Tony Antoniou, a pharmacist at St. Michael's and lead author of the study published Monday in the Canadian Medical Association Journal.

"Physicians should consider using alternate antibiotics in patients with other risk factors for hyperkalemia when clinically appropriate," he said.