Coca-Cola and PepsiCo have given millions of dollars to nearly 100 prominent health groups in recent years, while simultaneously spending millions to defeat public health legislation that would reduce Americans' soda intake, according to public health researchers.

The findings, published Monday in the American Journal of Preventive Medicine, document the beverage industry's deep financial ties to the health community over the past five years, as part of a strategy to silence health critics and gain unlikely allies against soda regulations.

The study's authors, Michael Siegel, a professor at the Boston University school of public health, and Daniel Aaron, a student at Boston University's medical school, scoured public records including news releases, newspaper databases, lobbying reports, the medical literature and information released by the beverage giants themselves.

"We wanted to look at what these companies really stand for," Aaron said. "And it looks like they are not helping public health at all ."

The report found a number of instances in which influential health groups accepted beverage industry donations and then backed away from supporting soda taxes or remained noticeably silent about the initiatives.

In one instance cited in the study, the nonprofit group Save the Children, which had actively supported soda tax campaigns in several states, did an about-face and withdrew its support in 2010. The group had accepted a $5 million grant from Pepsi and was seeking a major grant from Coke to help pay for its health and education programs for children.

Responding to the new research, Save the Children said, in a statement, that the group in 2010 had decided to focus on early childhood education, and that its decision to stop supporting soda taxes "was unrelated to any corporate support that Save the Children received."

The NAACP and the Hispanic Federation have publicly opposed anti-soda initiatives despite disproportionately high rates of obesity in black and Hispanic communities. Coke made more than $1 million in donations to the NAACP between 2010 and 2015, and more than $600,000 to the Hispanic Federation between 2012 and 2015. The groups did not respond to requests for comment.

Coke and Pepsi referred questions about the study to their trade group, the American Beverage Association.

"We believe our actions in communities and the marketplace are contributing to addressing the complex challenge of obesity," the beverage association said.

The New York Times last year reported that Coke had paid for scientific research that downplayed the link between sugary drinks and obesity.