Lurking deep inside some tumors are “factories” full of immune cells that help the body fight a rear-guard action against cancer and are key to helping some patients recover, new research shows.

In recent years doctors have turned to a new treatment for cancer, immunotherapy, which works by leveraging the body’s own immune system to fight tumors.

The technique has largely focused on white blood cells called T cells, which are “trained” to recognize and attack cancer cells.

But the innovative treatment only works well for around 20 percent of patients, and researchers have been trying to understand why some people respond better than others.

Three papers published on Thursday in the journal Nature point the way, identifying a key formation inside some tumors: tertiary lymphoid structures (TLS).

These structures function like “factories or schools” for immune cells that help the body fight cancer, said Wolf Fridman, a University of Paris professor emeritus who helped lead one of the studies.

“The cells need to be educated in schools, which are the tertiary lymphoid structures,” where they effectively learn to recognize and attack cancer cells, Fridman said.

Key to the findings is that T cells are far from the only immune cells capable of taking the fight to cancer, with researchers finding the TLS were full of B cells, a kind of immune cell that produces antibodies.

“We have been T cell addicts for 15 years in cancer,” Fridman said with a laugh. “We analyzed these sarcomas to see what groups they had, and what’s striking is that these B cells appeared.”

Beth Helmink, a fellow in surgical oncology at the University of Texas who worked on a second study, said the research changed perceptions of the role of B cells in immunotherapy.

“Through these studies, we find that B cells are not just innocent bystanders, but are themselves contributing in a meaningful way to the anti-tumor immune response,” she said in a statement issued by the Center.

The discovery is something of a surprise, as an abundance of B cells in cancer patients has sometimes been seen as a marker for poor prognosis.

But the studies found that patients with high levels of B cells inside TLS in their tumors were more likely to respond well to immunotherapy.

“These three studies provide exciting data demonstrating that … B cells which make antibodies significantly influence the responsiveness of patients with certain cancers to immunotherapy,” said Lawrence Young, director of the University of Warwick’s Cancer Research Center, who was not involved in the studies.

The work “could be used to improve the effectiveness of cancer immunotherapy for all patients,” he said.

There are still many unanswered questions.

Scientists are not yet sure why the structures form in some tumors and not others.

And while it now seems clear that B cells inside the structures play a key role in the success of immunotherapy, scientists aren’t sure precisely how.

It may be that the B cells are on the front lines, producing antibodies that attack cancer cells efficiently.

Or they may be bolstering T cells, or perhaps doing both.

And not all TLS are created equal. The researchers found three categories, but only one type was “mature” enough to churn out cancer-fighting immune cells.

Going forward, the research opens several promising avenues, the authors said.

Initially, it could help doctors screen patients to see which are most likely to respond well to immunotherapy.

And eventually, the research could mean more patients could be successfully treated with the technique, said Goran Jonsson, a professor of oncology and pathology at Lund University who worked on a third study.

“If we come up with a treatment that could enhance TLS formation, we could combine this with current immunotherapy regimens,” he said.

“Most likely this would lead to more patients responding to immunotherapy.”