Not every expert agrees cranberries, or cranberry juice, can help prevent urinary tract infections (UTIs): One study found people eating more cranberry products were 38 percent less likely to develop an infection, while a separate study found this benefit was small at best. However, the findings of a new study published in The Journal of Biological Chemistry may reconcile this difference of opinion.

UTIs typically occur when bacteria, such as E. coli, enter through the urinary tract and multiply in the bladder, the Mayo Clinic explained; though fungi and viruses can also cause a UTI. Once infected, the body will secrete a protein called siderocalin (SCN), which works as an antimicrobial to inhibit bacterial iron uptake. This uptake is how nearly all bacteria survive.

So to see how well SCN can influence an UTI, researchers sampled urine from volunteers previously participating in an immunological and pathogenic study conducted between 2008 and 2012. Among their results, they found urine better able to resist uptake had higher levels of pH (or more acid) and certain metabolites. Dr. Jeffrey P. Henderson, senior study author and assistant professor of medicine at Washington University School of Medicine in St. Louis, told Time the metabolites he and his team found were from dietary sources, not human cells.

“It looks like this protein that’s part of your immune system is able to use metabolites in the diet as grips to hold onto iron and keep it away from pathogenic bacteria,” Henderson said.

The high pH and metabolites together may be what promotes “restrictive urinary characteristics,” thus preventing or treating antibiotic-resistant E. coli UTI without compromising gut or vaginal microbes. More research would need to be done, but Henderson added the best part about his findings is the fact it proposes a non-antibiotic remedy.

Already now physicians recommend calcium-rich foods and supplements to boost urine pH. Think of citrus fruits, vegetables, and dairy products. But as Henderon points out to TIME, it’s harder to increase the levels of protective metabolites since there are individual differences to consider. Polyphenol-rich foods, however, are believed to source metabolities. These include tea, coffee, wine, and yep, cranberries.

Herein lies the possibility of reconciliation.

"One thing this suggests is that maybe the reason it’s not more effective is that people need both cranberries and a higher urine pH, or they need cranberries and appropriate inhabitants of their intestine, or the right microbiome composition in their gut, for the cranberry part to work properly," Henderson concluded.

Source: Shields-Cutler, R.R., et al. Human Urinary Composition Controls Antibacterial Activity of Siderocalin. The Journal of Biological Chemistry. 2015.