One day after school, parents thronged a hallway at Walt Whitman Middle School in Northern Virginia, plucking sweet potatoes, green beans, rice and whole frozen chickens from tables and bins. It was a week before Thanksgiving.

“Everything is good, everything is fresh, very fresh,” said Sandra Melendez, as her 12-year-old son carried bags of refried beans, fruit and broccoli. Free food from the school’s monthly market feeds Melendez’s family of seven for two weeks.

The school began the market about a year ago, after administrators learned families were struggling to get healthy food, said Craig Herring, the principal. It was part of a broader recognition that the school’s responsibility to students transcends the purely academic — especially at Whitman, where 64 percent of students are economically disadvantaged.

It became the first community school in Fairfax County in October, adopting a concept that imagines schoolhouses as nerve centers where students and families can also seek health and social services.

Community schools have long been fixtures in urban neighborhoods but have migrated to suburban and rural areas in the last decade as they contend with growing poverty and demographic changes.

They number about 5,000, stretching from the Washington region to Albuquerque to Oakland, Calif., said José Muñoz, director of the Coalition for Community Schools.

And their ranks are growing — by 2025, the coalition, an alliance of schools, government and philanthropies, wants to increase the number of community schools to 25,000, Muñoz said.

Some community schools are outfitted with health clinics or laundry facilities. At Whitman, a school worker guides families to food and housing resources, and is developing a mentorship program.

As Fairfax, a sprawling, affluent county, becomes more racially, culturally and economically diverse, schools are educating students who face steeper challenges, said Mary Ann Panarelli, Fairfax schools’ director of intervention and prevention.

“The needs are such that the doors need to be opened a little wider,” Panarelli said.

Fairfax County’s wealth overall — the median household income is $117,515 — masks the struggles some families endure. A report from the Northern Virginia Health Foundation last year pinpointed more than a dozen “islands of disadvantage” in the region where poverty and a lack of affordable housing and health insurance are endemic.

For the first time, all students at 19 Fairfax elementary schools automatically received free breakfast and lunch this academic year under a U.S. program for the nation’s schools with the greatest concentration of students from low-income families. Five of the elementary schools that send students to Whitman Middle qualify for additional federal dollars because they educate a large share of such students.

United Community Ministries in Alexandria is where some of the low-income families of Fairfax County turn for help.

For thousands of families who live around or along Richmond Highway in southeastern Fairfax, the day includes a trip to United Community Ministries, where they can visit a food pantry, train for a job, or take literacy and citizenship classes.

The nonprofit helps about 7,000 residents each year who live at or below the federal poverty line, or $25,100 a year for a family of four, said Alison DeCourcey, the executive director. The organization’s clients attest to the changing face of Fairfax: Once, most of the people it helped were African Americans. Now, it is helping more people from Africa, and Latinos and Asians, two of the county’s fastest growing populations.

“There’s this tremendous economic disparity,” DeCourcey said. “These students live on an island of disadvantage.”

Children account for 40 percent of those United Community Ministries helps. So when another nonprofit, United Way of the National Capital Area, wanted to help pay for a community school in Fairfax, United Community Ministries agreed to help establish Whitman’s community school.

Many such schools exist throughout the District, Maryland and Virginia. But Whitman was only the 13th to benefit from a $12.3 million pledge from the United Way to establish community schools at some of the region’s poorest middle schools, in the hope it will help curb dropout rates and other academic challenges. Another Fairfax school, Mount Vernon Woods Elementary became a community school this month.

“When it comes to thinking about the dropout problem, people are really thinking about high school students,” said Timothy Johnson, a United Way of the National Capital Area vice president. “We know that if you’re waiting until high school to address that, then, many times, it’s already too late to turn that ship around in time.”

The warning signs were troubling.

Just 13 percent of seventh-graders and 36 percent of eighth-graders from Buck Lodge Middle School in Prince George’s County were on track to graduate high school in 2015, shortly after Kenneth Nance started as principal and Buck Lodge became a community school.

So the school began enrolling those students in after-school programs, arranging more counseling and providing additional math and reading help.

In the years since, the number of Buck Lodge students on track to graduate has climbed: In 2017, it was 26 percent of seventh-graders and 55 percent of eighth-graders, according to school data. Suspensions have tapered, Nance said.

“The culture here is one where kids feel safe and they actually want to be here,” the principal said. “The community school model absolutely helps us with that.”

Rising economic inequality and residential segregation have sparked a renewal of the century-old community school approach, according to a 2017 report from the Learning Policy Institute, a nonprofit education research center.

The schools vary in the services they offer and how they operate but all rely on alliances with neighborhood groups to help students overcome hunger, homelessness and other hardships that impede students’ academic success.

Well-run community schools, the research institute found, improve student and school performance and help meet needs of “low-achieving students in high-poverty schools.”

In New Mexico, lawmakers passed legislation five years ago setting requirements for community schools.

The 23 Albuquerque public schools with the most children from low-income families are community schools, providing services such as job training for adults and English language classes, said Kristine Meurer, executive director of the school system’s student family and community supports division.

Albuquerque is lobbying the state to go further, pressing officials to provide money to help districts establish community schools. Some schools that received donations to operate full-service health centers, Meurer said, had to scale back hours after the money dried up.

On a blustery November day, as Whitman students scattered to the gym, classrooms and outdoors for after-school stepping, soccer and tennis classes, Delia Montecinos waited for parents as they filed into the family market.

A few months in as Whitman’s community school coordinator, Montecinos has helped families arrange health department trips and directed them to housing resources. She has designed a financial literacy workshop and gathered holiday gifts for students.

Before Montecinos was hired, the school’s social worker, psychologist and counselors connected students to social services, sacrificing time they spent helping students cope with social and emotional issues, said Herring, the principal.

The diminutive, soft-spoken Montecinos senses a familiarity with the students who populate Whitman’s halls. She once lived in a one-bedroom apartment shared by eight people and relied on BU-GATA an Arlington County organization that works with low-income, immigrant communities for tutoring and mentorship when she was a student at Washington-Lee High School and later at George Mason University.

“I was able to get these services,” she said. “Thanks to everything that I got, I am where I am.”