"At a very basic level, this act is about doing what's right for our children," Obama said before signing the bill. The ceremony was moved from the White House, where most signings are held, to an elementary school in the District of Columbia to underscore the point.
Besides Obama, the bill also was a priority for his wife, Michelle, who launched a national campaign this year against childhood obesity.
"We can all agree that in the wealthiest nation on earth all children should have the basic nutrition they need to learn and grow and to pursue their dreams," said Mrs. Obama. "Because in the end, nothing is more important than the health and well-being of our children. Nothing,"
The $4.5 billion measure increases the federal reimbursement for free school lunches by 6 cents a meal at a time when many school officials say they can't afford to provide the meals. The bill will also expand access to free lunch programs and allow 20 million additional after-school meals to be served annually in all 50 states. Most states now only provide money for after-school snacks.
The new law aims to cut down on greasy foods and extra calories by giving the government power to decide what kinds of foods may be sold on school grounds, including in vending machines and at fundraisers. While the government has long had nutrition requirements for the free and reduced cost meals it subsidizes, the bill would expand those requirements to cover all foods sold during school hours. It does not apply to after-school events.
Bake sales and other fundraisers that don't meet the new nutritional requirements would be allowed during the school day as long as they are infrequent. The language in the bill is broad enough that a president's administration could even ban bake sales, but Agriculture Secretary Tom Vilsack has said that he does not intend to do that. The USDA has a year to write rules that decide how frequent is infrequent.
Public health advocates pushed for the fundraising language, saying they are concerned about daily or weekly fundraisers that allow children to frequently substitute junk food for a healthier meal.
Many Republicans, including former Alaska Gov. Sarah Palin, have criticized the effort and the fundraiser limits in particular, saying the bill is too expensive and an example of government overreach.
Supporters say the law is needed to stem rising health care costs due to expanding American waistlines and to feed hungry children in tough economic times. Mrs. Obama cited a group of former generals and military officials who have said unhealthy school lunches are a national security threat because weight problems are now the leading medical reason that recruits are rejected.
She said it is ultimately the responsibility of parents more than anyone else to make sure their children eat right and get enough exercise, but that government has a role to play, especially when children spend so much of their time each day at school and when many of them get up to half their daily calorie intake from eating school meals.
"It's clear that we, as a nation, have a responsibility to meet as well," she said. "We can't just leave it to the parents. I think that parents have a right to expect that their efforts at home won't be undone each day in the school cafeteria or in the vending machine in the hallway."
The new nutrition standards would be written by the Agriculture Department, which would decide which kinds of foods may be sold and what ingredients can be used in school cafeterias and vending machines.
Popular foods like hamburgers and pizza will likely stay on school lunch lines but become healthier, made with leaner meat or whole wheat crust, for example. Vending machines could be stocked with less candy and fewer high-calorie drinks.
The child nutrition bill stalled in September when some liberal Democrats opposed it because it is partially paid for with $2.2 billion in future dollars for food stamps. But those Democrats dropped their opposition after Republicans made large gains in the November elections and the White House promised to find a way to restore the money.
Associated Press Writer Darlene Superville contributed to this report.