A 44-year-old man appeared to be recovering nicely after a double lung transplant at Northwestern Memorial Hospital in Chicago, Illinois. A week after the surgery, however, the patient, whose own lungs had been ruined by the inflammatory disease pulmonary sarcoidosis, grew confused and then became delirious. Although a brain scan found nothing wrong, tests showed that the amount of ammonia in his blood had spiked—and continued to rise even after dialysis to remove the toxin. Forty days after his surgery, he died.

Now, a new study implicates bacteria that normally live in the urinary tract as the cause of the man’s fatal illness and the deaths of other lung transplant patients. The work suggests a way to treat a rare but deadly complication of organ transplantation and cancer treatment.

Although our bodies normally produce small amounts of ammonia when we break down proteins, liver enzymes transform it into a safer compound, urea, which is excreted in our urine. In some organ transplant recipients and cancer patients, however, the amount of ammonia in the blood explodes. Although this condition, known as hyperammonemia, is unusual, “when it has occurred, it’s been disastrous,” says pulmonologist Mark Wylam of the Mayo Clinic in Rochester, Minnesota. The brain swells, and patients fall into a coma. “The end of the ordeal is that they die,” he says.

Not only is hyperammonemia resistant to treatment and usually fatal, but the cause has also been elusive. In 2013, Wylam and colleagues discovered the likely culprit in one case, a 64-year-old woman who died from hyperammonemia after a double lung transplant. They found that her blood and tissues were positive for a type of bacterium, Mycoplasma hominis, that often causes mild genital infections in women.

But the man who died at Northwestern Memorial Hospital showed no signs of M. hominis, thoracic surgeon Ankit Bharat of the Northwestern University Feinberg School of Medicine in Chicago and colleagues found. Instead, they detected a different bacterium, Ureaplasma urealyticum, in the man’s blood and in samples from his bladder, spleen, liver, and lungs. The team then tested tissue from three other lung transplant patients who had died from hyperammonemia, including the patient studied by Wylam and colleagues. All three showed evidence of infection with U. urealyticum or a kindred microbe, U. parvum. In contrast, 20 lung transplant recipients who didn’t develop hyperammonemia were negative for all three microbes, the researchers report online today in Science Translational Medicine.

The researchers also checked for the bacteria in two lung transplant recipients who had hyperammonemia but were still alive. Both patients carried U. urealyticum or U. parvum bacteria, and both recovered after antibiotic treatment.

Wylam, who wasn’t connected to the new study, says the results are convincing. “They have shown that U. urealyticum can also cause these unexplained cases of hyperammonemia.” The authors of the paper recommend testing lung transplant recipients who have hyperammonemia for Ureaplasma infection. The study also provides guidance about treating the condition. Although the man Bharat and colleagues studied had received the antibiotic azithromycin, the bacteria may have become resistant to it. The microbes are vulnerable to three families of antibiotics, so a combination of drugs would be a better choice to avoid resistance, Bharat says.

About two-thirds of us have Ureaplasma bacteria living in our urinary tract, where they feast on urea, breaking it down to produce energy and releasing ammonia as a byproduct. Why the bacteria occasionally trigger widespread infections and death isn’t clear. Cancer patients and transplant recipients have suppressed immune systems, and the microbes might take advantage of their weakened defenses. However, another possibility emerged when Bharat and colleagues found that the lungs of one donor already contained the bacteria before the organs were transplanted into the recipient. So donor organs could deliver the microbes to patients who develop hyperammonemia.

Ureaplasma microbes are hard to diagnose because they don’t like to grow in the cultures that hospitals often use to identify the culprits in bacterial infections. Unrecognized infections could be responsible for additional cases of hyperammonemia and even other illnesses, Bharat says. For example, he notes, the microbes could be causing disease in malnourished patients. “These organisms could be a bigger problem,” he says.