Worried that children were losing the war on obesity, New York City began to slim down its school lunch offerings several years ago, replacing fries with baked potato strips and introducing nonfat chocolate milk, whole grain pasta and salad bars, among other tweaks.

In the process, the city also cut calories. So much so, city officials now acknowledge, that it often served children fewer calories than required by the federal government.

The Bloomberg administration has often found itself stymied by the powers of Albany or Washington in its policy goals, including enacting congestion pricing, erecting a stadium on Manhattan’s West Side, taxing soda or barring the use of food stamps for sugar-sweetened beverages.

But in the case of the 860,000 school lunches served daily, it ignored a set of United States Department of Agriculture requirements written in 1994, without seeking permission. City health and education officials said their aim was not to lower calories, but to increase the nutritional value of the foods reaching students’ mouths. But as it slowly began re-engineering those foods, there was a “secondary response,” said Cathy Nonas, a senior adviser in the city’s health department. “It dropped the calories and at sometimes below what the U.S.D.A. had as a minimum,” she said.

In replacing pork bacon strips with the turkey variety, for instance, officials cut 64 calories from one serving. And they saw no need to bulk the trays back up.

“Our mentality is to feed food to children, not nutrients to astronauts,” said Eric S. Goldstein, the chief executive for school support services for the New York City Education Department.

The city officials said new federal guidelines, which take effect this school year, prove they were right all along. The new rules reduce the minimum calorie counts by more than 200 calories in some grades and, for the first time, set calorie maximums as well. But the officials acknowledged that for older students, the new rules still demand more calories on the lunch tray than New York City schools have been providing.

Because the city expects the state and federal governments to more rigorously audit school lunches, the Education Department’s chefs have been busy in a test kitchen in Long Island City, Queens, fine-tuning menus to meet the new nutritional standards, which include limits on sodium and more use of fruits, vegetables and whole grains. And, city officials said, they are also making sure the meals have enough calories.

Several nutritionists and academics hailed the city’s decision to leave calorie amounts lower in recent years, even if they fell short of federal rules. “If you are delivering better calories, then that is important,” said Y. Claire Wang, an assistant professor in health policy and management at Columbia University’s Mailman School of Public Health, who said she did not feel the city had been underfeeding any students.

William J. McCarthy, a professor of public health and psychology at the University of California, Los Angeles, said the city had been a leader in getting children to eat more healthy foods. “There’s been an excess of focus on trying to get the right number of calories,” he said. “The calories will take care of themselves if we get kids to make better food choices such as filling half their plate with vegetables.”

But Joel Berg, the executive director of the New York City Coalition Against Hunger, called the city’s move “reckless.”

“It is based on politics and personal whims, not nutrition science,” Mr. Berg said. “It is based on the city’s absurd belief that hunger no longer exists among children, despite federal data that proves that one in four New York City children live in food-insecure homes. The city’s one and only response to child hunger is taking food away from kids.”

The city could not say, precisely, how long students have been receiving meals whose calorie counts did not always meet the federal requirements, or exactly how many calories they were short. Under the old guidelines, most students had to receive 785 calories at lunch. The new rules require 550 calories through the fifth grade, 600 for middle schoolers and 750 for high schools. The maximums are 100 calories higher than the minimums.

The Education Department noted that it began introducing salad bars in schools in 2005. Under federal rules, calories derived from salad bars do not count toward meeting the minimum, but they can nonetheless provide healthy nourishment.

School districts must follow U.S.D.A. guidelines to qualify for federal school lunch financing, which in New York City amounts to more than $400 million a year. But no oversight agencies seemed to be aware of the short calorie counts, and it is unlikely the city will be penalized for past years.

Officials at the Agriculture Department referred all questions to the state Education Department, which is responsible for assessing school districts’ compliance with nutritional standards. The federal officials did concede, however, that some schools around the country had difficulty in crafting menus that always met all the former federal standards for every type of meal.

State officials were puzzled by the city’s acknowledgment, because they believed the city had offered the correct amount of calories to students at lunchtime. In their last analysis of the city’s program, in May 2010, they discovered evidence of “calorie deficits,” but the reason was that students took less food than was offered, said Sandy Sheedy, a school food program specialist for the state.

“I believe that if a child took every item of their menu plan, they would have reached the calorie standards that were established in law, ” said Ms. Sheedy, who said the city was educated in ways to address those deficiencies.

The menu changes were part of an ambitious city campaign against childhood obesity that dates back almost a decade, and also included eliminating soda from all school vending machines; supplanting canned vegetables with fresh and frozen ones; removing artificial trans-fat from all foods served in schools; reducing sodium and increasing fiber; and removing all deep fryers.

The Bloomberg administration has also decided not to make it mandatory for schools to provide breakfast in classrooms, contending it entices children to overeat; the City Council has criticized the decision, saying it would deny food to hungry children. (Students can still get free breakfast in cafeterias before school.) Last year, the city said that the number of obese students, in kindergarten through eighth grade, had dropped 5.5 percent over the previous five years, based on the results of annual fitness exams. It was the biggest decline cited by any large city, but 21 percent of elementary and middle school children were still obese.