A judge struck down a New York City rule Tuesday that required fast-food restaurants to post calorie counts on their menus.

U.S. District Judge Richard J. Holwell said he determined the rule conflicted with federal law. Businesses had claimed that their First Amendment rights were violated by the rule, described as the first of its kind in the nation, but Howell said he reached his decision without needing to address those claims.

The city had targeted national fast-food chains, applying the law only to those that served standardized portion sizes and were already making calorie information available voluntarily as of March 1.

The New York State Restaurant Association had challenged it.

On the other side, the National League of Cities, the National Association of County & City Health Officials, the International Municipal Lawyers Association and the League of California Cities supported the city, saying the new rule was necessary to fight obesity.

In the last 25 years, obesity rates have doubled among U.S. adults and tripled among children, and rates have increased in every state in the nation, the groups said.

The Centers for Disease Control and Prevention estimated in a 2005 study that approximately 112,000 deaths are associated with obesity each year, making obesity the second leading contributor to premature death, behind tobacco.

In arguments supporting the city's rule, the groups argued that an adverse ruling would undermine pending legislation in state and local legislatures around the country.

Legislation similar to New York City's is under way in 14 states where obesity rates have recently surged — Arizona, California, Connecticut, Hawaii, Illinois, Maine, Massachusetts, Michigan, New Jersey, New Mexico, New York, Pennsylvania, Tennessee and Vermont.

Nutrition labeling legislation has also been introduced in Chicago, Philadelphia and Washington.

New York City's rule took effect in July, but enforcement was suspended pending the outcome of the court fight.