On a recent afternoon at Amador Valley High School in Pleasanton, Calif., students sat at picnic tables and bit into McDonald’s cheeseburgers, Subway sandwiches and Quiznos flatbreads. They didn’t have to travel far to get their fast-food fix for lunch. In fact, they didn’t even have to leave campus. The burgers and sandwiches were available right inside their school cafeteria.

As they try to keep pace with student taste, lunchrooms across the country have given up meatloaf and mashed potatoes for brand-name fast-food items. In Edmond, Okla., middle school students load up their trays with Chick-Fil-A sandwiches. In Niskayuna, NY, elementary-schoolers get slices of Pizza Hut, fresh from the deliveryman. In Livermore, Calif., the high school cafeteria offers Panda Express rice bowls, Little Caesar’s pizza and burritos from a local chain.

Those choices don’t exactly encourage healthy eating habits, as they reinforce children’s taste for fast food. But even in the face of an obesity epidemic, cafeteria directors say they need the brand-name meals to keep their programs running.

“This community is very brand-conscious,” said Frank Castro, who runs the lunch program in the Pleasanton Unified School District. “I could offer the same hamburger or a better quality burger, but it wouldn’t increase my lunch count.”

For Castro and other meal program directors, increasing the lunch count — the number of student purchases — is key to staying in business. Schools that participate in the National School Lunch Program receive federal reimbursements for every meal they serve, along with agricultural commodities donated by the Department of Agriculture. That allows them to offer free and reduced-price meals to low-income students. But the government support only covers about half of the expenses for a typical cafeteria. To cover labor and facilities costs and keep their programs in the black, food service supervisors turn to students with lunch money.

The only way to keep the lunchroom running, then, is to keep students buying. And when brand-name items appear on the menu, “the kids will line up a mile long,” said Amy Hedrick, the food service supervisor in the Scotts Valley Unified School District in California.

Hedrick used to offer a generic pizza for lunch, and 250 to 300 students would line up in the cafeteria. Now, when she dishes out slices of Round Table at her elementary schools, she serves up to 400 kids.

“Financially, it’s better for us if we go up to 400 meals,” Hedrick said. “If I do not break even and I encroach into the general fund, I’m going to have to cut back my staff.”

It’s the same story in Livermore, where Director of Campus Catering Barbara Lee serves entrees from Panda Express, Little Caesar’s and a local Mexican food chain. Lee has tried making her own burritos, her own teriyaki chicken and her own sandwiches on homemade bread. But with high labor costs and inadequate facilities, cooking from scratch is difficult and costly. What’s more, students don’t buy the homemade items; Lee is lucky if she can sell four sandwiches on a given day.

“We may be thinking we can make a menu with all these healthy options, but our customers won’t eat it because they’re used to all the branded options,” Lee said. “We can’t compete with those marketing dollars. We don’t have marketing dollars.”

The competition is fierce indeed. Last July, the Federal Trade Commission reported that food companies spent $1.6 billion on marketing to children and teens in 2006. Most of those advertisements were for unhealthy items. A 2005 study by the Center for Science in the Public Interest, a leading advocacy group on nutrition and health, found that nine out of 10 commercials on Saturday morning television were for fast food, sugary cereals and other low-nutrient foods.

Meal program directors say the brand-name items they serve are nutritious because they’re tweaked to meet the USDA requirements for school meals. The slices of pizza, for example, get a health boost from low-fat cheese and a whole-wheat crust.

Still, parents and health advocates say Chick-Fil-A sandwiches and Domino’s pizza don’t belong in schools.

“Everything that’s marketed in school carries that school’s seal of approval,” said Susan Linn, director of the Campaign for a Commercial-Free Childhood. “Schools are not supporting the health and well being of children if they’re endorsing fast food.”

However, cafeterias are hesitant to give up the branded items because of the revenue they bring in. When a group of parents in Pleasanton asked Castro to stop serving McDonald’s hamburgers in the elementary school cafeteria, he explained that the burgers brought in 25 percent more sales. “Parents can always choose not to have their child buy lunch that day,” he said.

Linn said parents who want to see change should approach their school’s wellness committee, not the cafeteria. All schools are required to have wellness policies addressing nutrition education and physical activity. In many schools, the wellness policies have gotten rid of unhealthy foods like French fries, which would have otherwise stayed in the cafeteria because they drove sales. Strengthening district policies on in-school marketing could do the same for fast food, Linn said.

“The purpose of school is to teach reason, and the purpose of advertising is to subvert reason,” Linn said. “We need to be educating children to choose food on the basis of nutrition and taste, not based on what’s on the box.”

Deborah Lehmann is an editor of School Lunch Talk, a blog about school food. She is currently studying economics and public policy at Brown University.