Enrollment in nearly half of the nation’s largest school districts has dropped steadily over the last five years, triggering school closings that have destabilized neighborhoods, caused layoffs of essential staff and concerns in many cities that the students who remain are some of the neediest and most difficult to educate.

While the losses have been especially steep in long-battered cities like Cleveland and Detroit, enrollment has also fallen significantly in places suffering through the recent economic downturn, like Broward County, Fla., San Bernardino, Calif., and Tucson, according to the latest available data from the Department of Education, analyzed for The New York Times. Urban districts like Philadelphia and Columbus, Ohio, are facing an exodus even as the school-age population has increased.

Enrollment in the New York City schools, the largest district in the country, was flat from 2005 to 2010, but both Chicago and Los Angeles lost students, with declining birthrates and competition from charter schools cited as among the reasons.

Because school financing is often allocated on a per-pupil basis, plummeting enrollment can mean fewer teachers will be needed. But it can also affect the depth of a district’s curriculum, jeopardizing programs in foreign languages, music or art.