A judge ruled on Thursday that the New York City health department could not require young children to be vaccinated for the flu to attend city-licensed preschools and day care centers, striking down one of the more ambitious public health initiatives of the Bloomberg administration. Justice Manuel J. Mendez ... said the city could not add influenza to the list of diseases requiring immunization without action by the State Legislature. The mandate ... was scheduled to take effect in January. It required children between the ages of 6 months and 59 months to be vaccinated by shot or mist. The measure was approved unanimously by the Board of Health. But the proposal soon met fierce opposition, with many parents resisting and saying that their doctors told them the vaccine was not needed. The court ruling did not delve into the debate about vaccines. Michelle Carroll, 44, one of the plaintiffs in the suit and the mother of a 4-year-old girl, said the ruling was a victory for parents. "It's important for people to remember that vaccines are drugs and just like any other drug, not every vaccine is going to be right for every single child," Ms. Carroll said. The ruling was important, she said, because it left "the decision about whether or not to vaccinate our smallest, youngest, most vulnerable citizens" with pediatricians and parents.