Cancer patients who took antibiotics during immunotherapy treatment lived about half as long as those who avoided the drugs, a new UK study of more than 300 people has found.

Researchers said the new work underscores the importance of taking antibiotics only when medically necessary, and shows general practitioners should coordinate closely with oncologists when treating patients on cutting edge treatments.

“Clearly, we need to treat serious or life threatening infections with antibiotics,” said a co-author, Nadina Tinsley of the Christie NHS Foundation, where the research was conducted. “The challenge is striking the right balance.” The research was presented at the American Society of Clinical Oncology in Chicago, the world’s largest annual cancer conference.

Researchers studied 303 patients who underwent cancer treatment with immunotherapy called checkpoint inhibitors. These drugs work by activating the body’s immune system against cancer cells.

However, researchers believe bacteria in the digestive system play a role in activating the body’s immune system, by encouraging activity in the toxin-rich gut. There, the body “recruits” t-cells to keep harmful bacteria at bay. Researchers believe antibiotics “clear the gut” of those bacteria, which take weeks to recover, and may cause t-cells to be less active.

“There are lots of toxins in our gut,” said Tinsley, “and they will recruit the immune system to be active, and there will be more white blood cells.” Without those bacteria, the immune system may be less active overall, diminishing the effects of immunotherapies. Infections are a common complication for cancer patients.

Researchers looked at patients between January 2015 to March 2017 at the Christie NHS Foundation Trust, and studied 303 patients with melanoma, non-small cell lung cancer and renal cancer. About one-third of all the patients received antibiotics either two weeks before or six weeks into their cancer therapy. The study is retrospective.

Blood samples taken from a patient receiving an immunotherapy treatment. Photograph: Elaine Thompson/AP

Patients who did not take antibiotics had almost twice the time without cancer progression, 178 days versus 97 days for those who took antibiotics. As well, patients who took antibiotics survived less than half as long, 317 days, as those who did not take the drugs, 651 days. Patients who took multiple courses of antibiotics had dramatically worse outcomes, at just 87 days, and 193 days of overall survival.

Experts said what made the research particularly strong was that it included demographic information, prior treatment, and importantly, the extent of a patient’s disease, factors which had confounded previous research. This allowed researchers to take into acount whether patients who received multiple courses of antibiotics were sicker overall.

“It’s potentially quite a big, big problem,” said Dr Matthew Krebs, a co-author. “Sometimes they are for a genuine infection but other people get antibiotics unnecessarily. The patient might just have had a temperature but this is affecting their [cancer] outcome.”

Scientists said more research is needed with a larger group of patients, but that the study holds promise. If more studies show how antibiotics interfere with immunotherapy, it may be possible to show how intestinal flora can help new cancer treatments.

Dr Monty Pal, an expert on cancers of the kidney, bladder and prostate and the co-director of the City of Hope’s kidney cancer program, said the study represented the best to date, and “confirmed the association between antibiotic use and impeded outcomes” for immunotherapies.

“It ties into the theme of really not using antibiotics for frivolous or non-indicated uses,” said Pal.

“People should be open and aware of the prospect of – association with – the use of antibiotics,” said Pal. “If the antibiotics are given for a clear indication, ie medically necessary, don’t refuse them … The bottom line is if you need antibiotics, you need antibiotics.”

• This article was amended on 4 June 2018 to make the headline better correspond with the text. The earlier heading read: Antibiotics greatly reduce effectiveness of cancer treatment – study.