The beverage giants 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 on 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. While some of the incidents cited in the study already have been reported by news organizations, the medical journal report is the first to take a comprehensive look at the industry’s strategy of donating to health organizations while at the same time lobbying against public health measures. The study tracked industry donations and lobbying spending from 2011 through 2015, at a time when many cities were mulling soda taxes or other regulations to combat obesity.

“We wanted to look at what these companies really stand for,” said Mr. Aaron, the study’s co-author. “And it looks like they are not helping public health at all — in fact they’re opposing it almost across the board, which calls these sponsorships into question.”