The decision by a New York State judge striking down the Bloomberg administration’s ban on large, sugary drinks this week was not just a high-profile victory for the soda companies in their pitched battle against anti-obesity policies that are aimed at their products. It was also a victory for the industry’s steadfast, if surprising, allies: advocacy groups representing the very communities hit hardest by the obesity epidemic.

Dozens of Hispanic and African-American civil rights groups, health advocacy organizations and business associations have joined the beverage industry in opposing soda regulation around the country in recent years, arguing that such measures — perhaps the greatest regulatory threat the soft-drink industry has ever faced — are discriminatory, paternalistic or ineffective.

Many of these groups have something else in common: They are among the recipients of tens of millions of dollars from the beverage industry that has flowed to nonprofit and educational organizations serving blacks and Hispanics over the last decade, according to a review by The New York Times of charity records and other documents.

Soda companies have sponsored conferences for the National Hispana Leadership Institute, scholarships for local chapters of the National Association for the Advancement of Colored People, financial literacy classes offered by the National Puerto Rican Coalition and programs from the National Hispanic Medical Association.