CRANFORD, N.J. — As her chemistry laboratory got rolling here one winter morning, with masked students taking their stations at a pandemic-safe distance, community college professor Sherry Heidary aimed to teach more than how to separate mixtures through chromatography.

She exhorted one student to believe in herself. “You’re getting an A, right?” she said, more of a demand than a question. Then the professor gently chided a latecomer who didn’t turn in an assignment. “Not going to happen again, right? Good.”

The lesson behind the lesson: They all belong. There in the lab, there at Union County College, there on the path to a degree.

It’s an urgent message for community colleges everywhere as they struggle to fill classes after a shocking nationwide enrollment plunge in the fall that educators blame on the coronavirus crisis and economic and social upheaval.

“If I cannot keep them in the class, I can’t teach them,” Heidary said. “The first job is, bring them here. And make them want to come.”

Community colleges, long the unsung foundation of higher education in America, have reached a perilous turning point. These two-year public colleges, offering associate’s degrees, workforce training and a low-price opportunity to get started on a bachelor’s degree, had roughly 10 percent fewer students at the beginning of the school year compared with 2019.

No other sector of higher ed lost as much enrollment — a devastating development for these schools that serve large numbers of disadvantaged students and are open to all who apply. History suggests that when the economy sinks, people flock to community college to upgrade skills and résumés. That didn’t happen last year.

But community colleges now have a powerful White House ally in first lady Jill Biden, who is an English professor at a major one in Northern Virginia. The Biden administration is likely to push for tuition breaks and other measures that benefit community college students. It’s the broadest political opening for these colleges in the last decade.

During last year’s campaign, President Biden proposed making tuition free for public college students with annual family income below $125,000. The federal government would pay 75 percent of the cost and states the rest. Such ideas could draw significant support from the Democratic-controlled Congress.

“We have to get this done. And we have to do it now. That’s why we’re going to make sure that everyone has access to free community college and training programs,” Jill Biden said last month in remarks taped for a virtual conference of the Association of Community College Trustees and the American Association of Community Colleges.

The first lady also disclosed plans for a White House summit on community colleges. “They are our most powerful engine of prosperity,” she said.

Leaders of the sector sense a unique chance to promote their schools. “It is quite a moment,” said Walter G. Bumphus, president and chief executive of the American Association of Community Colleges. “I know Dr. Biden, and I know the president. We’ve worked closely with them.”

Community colleges are essentially an American invention dating to the early 20th century. They expanded enormously after World War II. There are more than 950 nationwide, counting public colleges that offer primarily associate’s degrees. They are sometimes called technical or junior colleges, and some also offer bachelor’s degrees. In all, these schools enrolled nearly 6.7 million students in fall 2018, roughly 40 percent of all undergraduates. Students are drawn by low tuition, and they generally live at home and commute to school.

Eloy Ortiz Oakley, chancellor of the California Community Colleges, said the schools have strong support on Capitol Hill. The question, he said, is what steps the government should take. Raise Pell grants for students in financial need? Enact debt relief for those with student loans? Expand tuition subsidies for “free college?”

“There’s arguments to be made for all of them,” Ortiz Oakley said.

Fall enrollment fell 8 percent among his colleges, Ortiz Oakley estimated. Students were forced to make “difficult choices about paying rent or buying books,” he said. “That doesn’t mean we’ve lost them. They had to hit the pause button.”

Growing community colleges matters not only for the economy, experts say, but also for the causes of racial and social justice. Huge numbers of students of color rely on them to climb the social ladder: About 13 percent of students at public two-year colleges in 2019 were Black, and 26 percent were Hispanic. Community colleges embody many American ideals.

“As they go, so goes the country,” said Josh Wyner, executive director of the College Excellence Program at the Aspen Institute and author of a book on quality community colleges. “And so go communities. . . . Without them, we’re really going to be hard-pressed to make good on the promise of equal opportunity for a good life and a good career.”

The pandemic has proved a major setback for those goals.

The National Student Clearinghouse Research Center reported in December that enrollment at public two-year colleges had fallen 10 percent while public and private, nonprofit four-year colleges were virtually unchanged. For-profit colleges grew 5 percent. Perhaps more troubling, freshman enrollment at public two-year schools fell 21 percent.

“A horrific hit,” said Davis Jenkins, a senior research scholar with the Community College Research Center at Teachers College of Columbia University. He said he is very worried about the colleges. “They’re a critical institution for our democracy. They serve students that no other institution does.”

Students like Jose Alvarez, 21, of Union, N.J.

His father is a die maker and welder, and his mother works for FedEx. Neither went to college. Alvarez joined the Marine Corps after high school with hopes of becoming a commissioned officer and pilot someday. But he found he would need a bachelor’s degree. That led him to Union County College.

“I basically took it as a second chance,” he said.

A Marine reservist, Alvarez studies full time, works 20 hours to 25 hours a week at a Panera Bread restaurant, tutors students in math and physics and is the student government president. He receives financial aid and is paying about $120 out of pocket this semester toward college bills.

Alvarez said he was recently accepted to the New Jersey Institute of Technology, in nearby Newark, as a transfer student in mechanical engineering. He helps organize events, such as a virtual karaoke night, that aim to give Union County classmates a semblance of “the college experience” despite the pandemic. “Have fun, relax,” he said. “Let them feel they’re not alone.”

Isabel Medina, 20, of Springfield, N.J., is studying practical nursing. Her mother was a nurse, her grandmother a caretaker. Medina took a job after high school as a secretary, but it wasn’t for her. She signed up at Union County and receives some financial aid. She spent $800 herself this semester on tuition, a nursing uniform and books.

Remote college in the fall was tough. “I felt like I was basically teaching myself,” she said. Now she has a mix of face-to-face and online courses while she works four days a week selling glasses at an optician’s shop. Her grades were disappointing in high school, she said, but are strong now. She hopes to transfer to Rutgers University.

“I want to be a great nurse,” Medina said. “In my head, I said, ‘Take it step by step. Get your feet wet. If you try different paths, a door will open.’ ”

The college here, in a densely populated county just west of Staten Island, counted 8,298 students in the fall. That was a drop of nearly 10 percent, echoing the national pattern. It was the steepest annual decline in a decade-long slide that also tracks with wider education trends. In 2010, after a surge driven by the Great Recession, Union County’s enrollment peaked at more than 12,800.

Margaret M. McMenamin, the college president since 2010, said some of the shrinkage is positive. Far more students these days are graduating, she said, and far fewer are taking classes they don’t need. The college confers about 1,700 certificates and degrees a year, up from about 900 in 2010. Two-thirds of its students are Black or Latino. Tuition and fees for full-time students who live in the county total $2,640.50 per semester. That’s far less than the price at nearby public universities.

The Aspen Institute recognizes it as one of the top 150 community colleges in the country. Last year, Union County even sent a transfer student downstate to ultraexclusive Princeton University.

Ideally, McMenamin said, enrollment would be about 10,000.

But crisis erupted after schools and colleges nationwide switched to remote teaching in March 2020 because of the pandemic.

Suddenly, the pipeline of graduating high school seniors was jeopardized, and students already enrolled at Union County faced questions about whether to stay. Recruiting visits were interrupted. Families were in turmoil, parents thrown out of work, computers and Internet access uneven.

“A good portion of our students were so compromised that they just couldn’t conceive of going to college,” McMenamin said. “Our challenge is to figure out: How do we reach them? How do we get into their communities, into their heads, into their churches, to try to draw them back?”

It is an all-out campaign. McMenamin said the college launched a recruiting and retention drive to persuade students that coming to college and staying there should be “part of their family’s survival plan.” Loaning out laptops has helped, and so have federal and state funds and private donations for emergency student aid, as well as a gradual reopening of classrooms, although some faculty are worried about health risks. About 22 percent of courses are now taught in person, up from 14 percent in the fall.

In Texas, San Jacinto College last year started calling thousands of students to gauge their concerns. Its chancellor, Brenda Hellyer, joined in. Her script: “I’m Brenda from SanJac. Just wanted to check in on you. How are you doing? What do you need from us?” Hellyer said many sought food, academic advising or mental health support. San Jacinto, in the Houston region, is one of the largest community colleges in the state. It had about 31,000 students in the fall, down by 4 percent.

Freshman enrollment dropped even more, Hellyer said. “How do we get them back?” she asked. “Where’d they go?”

In Tennessee, community college enrollment dropped 11 percent in the fall. That is especially significant because the state is a leader in the free-tuition movement. In 2015, it began offering “last-dollar” grants to qualified high school graduates within the state that would cover tuition bills for a two-year college program after accounting for other student aid.

The freshman class swelled significantly that year. The program, Tennessee Promise, funded through state lottery revenue, has since expanded to certain groups of older students.

Now, much of the progress it made has been undone. “The pandemic, of course, provided quite a significant head wind,” said Russ Deaton, executive vice chancellor for policy and strategy with the College System of Tennessee. “In many ways, it was those students who were loosely tethered to higher education anyway who were more likely to say, ‘I can’t do it this fall.’ ”

The Tennessee situation shows that tuition, while significant, is only one of the many barriers to earning a credential. Community college students often have children and part- or full-time jobs. Food and housing insecurity routinely derails them. And those challenges have been exacerbated by the public health and economic crisis.

“For a lot of students, going to college is not possible if they don’t have access to child care, transportation,” Carmel Martin, deputy director for economic mobility on the White House Domestic Policy Council, said in an interview. “We need to ensure they can afford the tuition but also that they have the support to be successful and complete their program.”

Community colleges often get less public funding than four-year colleges and universities. During his campaign, Biden proposed grants for colleges that enroll a high proportion of students from low-income families — an initiative akin to the anti-poverty Title I program for public schools. Biden has also called for more federal spending on workforce training, another idea that could boost community colleges.

Officials at all levels of government value the role these schools play in the economy. “You see governors across the country from both parties really seeing community colleges as part of the answer to building an effective workforce development system,” Martin said.

Not every community college is shrinking. Northern Virginia Community College, where Jill Biden teaches, reported a record fall enrollment of 52,869 students. That’s up 2 percent since 2019 and 8 percent since 2010. Most other community colleges in Virginia and Maryland reported annual enrollment drops. The head count plunged 15 percent at Baltimore City Community College.

Northern Virginia is known for its close dual-enrollment ties with local high schools, as well as a transfer program that sends thousands of students to George Mason University and other public universities for bachelor’s degrees.

“Our existing students are sticking with us,” Anne M. Kress, president of Northern Virginia, said. She credited the faculty’s expertise in online education, as well as intensive outreach to low-income families to avoid the phenomenon of disappearing students known as “summer melt.” What community colleges need, Kress said, is funding comparable to the rest of public higher education.

Here in New Jersey, many Union County students praise a state program that helps cover community-college tuition for those with low to moderate family income.

“When I enrolled here, I thought I’d get nothing,” said Vincent Eynon, 19, of Springfield. He is a first-generation student. Then he heard he had landed the state grant. “It was probably one of the best days of 2020 for me,” he said.

Eynon said Union County College deserves respect. When he was in high school, Eynon sensed the community college was not highly regarded. “That really planted an ugly seed in my mind,” he said. “But shortly after getting here, I realized all that stigma’s false. Here, the primary focus is on us. We’re all very well taken care of.” He plans to transfer soon. “I’m aiming as high as possible.”