Gov. Robert F. McDonnell vetoed a bill Thursday requiring all elementary and middle school students in the state to participate in at least 150 minutes of physical activity a week, describing the proposal as an unfunded mandate on Virginia’s schools.

His decision followed weeks of lobbying by school officials, particularly in populous Northern Virginia, who argued that the requirement could extend the school day, lead to cuts in arts and music classes and cost millions of dollars to hire new teachers.

Mc­Don­nell, a Republican who frequently praises small government and criticizes federal mandates, has not issued any other vetoes since taking office last year.

“While I strongly agree that we must encourage exercise and physical activity, I oppose unfunded mandates, whether they come from Washington or Richmond,’’ Mc­Don­nell said. “In the fight against childhood obesity and preventable disease, we all have a role to play. Government cannot just pass legislation and make this problem go away.”

The bill was designed to help fight childhood obesity, a cause championed by McDonnell’s wife, Maureen, as well as by first lady Michelle Obama.

The measure followed the D.C. Council’s approval last year of school nutrition and physical education standards that were among the strictest in the country.

“I’m disappointed,’’ said Sen. Ralph S. Northam (D-Norfolk), a doctor and one of the bill’s sponsors. “Childhood obesity is an epidemic.”

The bill would have been most significant in kindergarten through fifth grade, where experts estimate that fewer than 10 percent of state schools meet the 150-minute mark.

In Fairfax County, the state’s largest school district, students at 139 elementary schools are required to take at least 60 minutes of physical education a week. Prince William, the state’s second-largest district, requires 90 minutes a week for students at 55 elementary schools.

Fairfax Superintendent Jack D. Dale, who estimated that the proposal would have cost the school system as much as $24 million a year, said he was relieved by McDonnell’s veto. He said he supports Mc­Don­nell’s approach of trying to combat childhood obesity in a more “comprehensive and thoughtful’’ way.

“What does make sense is for him to use his bully pulpit to attack the problem,’’ Dale said.

Mc­Don­nell, a father of five, said he would instruct his staff to look for “creative and innovative” ways to get children more physically active, including using programs already in place, such as school health advisory boards, to establish wellness policies for schools.

“I hold the governor to his word that he will do something to work on this problem and get the kids healthy,” said Del. John M. O’Bannon III (R-Henrico), a doctor and another sponsor of the bill.

Thirty-one percent of Virginians ages 10 to 17 are overweight or obese, according to a 2007 survey conducted by the Kids Count project of the Annie E. Casey Foundation. Extra pounds lead to a greater risk of diseases such as Type 2 diabetes, high blood pressure, heart disease and high cholesterol.

“Today, nearly one in three Virginia children is overweight or obese, and Gov. McDonnell has missed an ideal chance to show significant leadership on this problem by vetoing this legislation,’’ a coalition of public health groups that lobbied for the bill said a statement.

In 2008, legislators passed a bill recommending 150 minutes of activity in schools but most did not abide by the recommendation.

This year’s bill mandated 150 minutes of physical activity, excluding recess, to be implemented by 2014. Legislators also agreed to recommend — but not require — 150 minutes of weekly activity for high schools.

No bill has garnered as much attention since the legislative session ended last month, with pressure mounting in recent days for Mc­Don­nell to veto or amend the bill.

The Virginia Education Association, which represents 60,000 teachers and other employees across the state, had strongly opposed the measure — along with the school boards, superintendents, cities and counties — but supports the goal to provide more physical activity for children.

Robley S. Jones, the VEA’s director of government affairs, said that if the state had wanted to implement the program correctly, it should have provided districts with money for additional teachers or facilities. “The state ought to put up their fair share,’’ Jones said.

O’Bannon said additional money was not provided because any elementary or middle school teacher can teach physical education, so schools would not have had to hire new teachers.

It is unlikely that the General Assembly has enough votes to override the veto when legislators return to the Capitol on April 6.

The bill passed overwhelmingly in the Democratic-led Senate but only by a vote of 55 to 40 in the Republican-controlled House of Delegates. It would take two-thirds, or more than 65 delegates, to override McDonnell’s veto.

Instead, Northam said that he would probably reintroduce the bill next year.