D.C. Mayor Muriel E. Bowser (D). (Bonnie Jo Mount/The Washington Post)

MANY AMERICANS are rightly outraged by the Trump administration’s treatment of migrant children, who have been separated from parents and ill-treated by authorities. Democrats have been understandably eager to distance themselves from such policies — a stance that can result in knee-jerk opposition even to sensible practices in effect during the Obama administration.

That might explain the nearly uniform outcry from Washington-area politicians incensed at federal plans to build new shelters for migrant children in Northern Virginia and the District . The shelters, state-licensed and similar to scores across the county in operation since before President Trump took office, would help move migrant children out of squalid, cramped Border Patrol stations near the U.S.-Mexico border. They would provide a way station for unaccompanied minors while federal officials seek to place them with U.S.-based relatives or foster families.

But local politicians, nearly all Democrats, have balked at cooperating with federal authorities on any immigration matter. They have denounced the proposed new shelters with objections that smack of NIMBYism masquerading as humane concern for children. This month, the administration of D.C. Mayor Muriel E. Bowser (D) enacted emergency rules that blocked a planned federal shelter.

There are currently some 8,700 minors, mainly teenagers, housed in about 170 such shelters nationwide. For most, the stay in those facilities is relatively brief — on average, a little more than six weeks, until the Office of Refugee Resettlement, an agency of the Department of Health and Human Services, places them with relatives or foster families. Those facilities had insufficient beds to handle the surge of unaccompanied minors who crossed the border earlier this year, hence the appalling images of children stuck in jam-packed Border Patrol outposts and emergency detention centers.

By building new shelters, the government would add future capacity to avoid such bottlenecks and terrible conditions in the event of another spike in border crossings. That’s smart. So why the objections from local leaders, including Ms. Bowser and the top elected leaders in suburban Fairfax and Loudoun counties?

The answer seems at least partly to be political optics; by cooperating in any way with the administration’s immigration moves, they might fear being seen as complicit. Ms. Bowser called the shelters “warehouses” that dehumanize migrant children; she insisted the facility proposed for the District (planned capacity, 200 beds) was too big. Sharon Bulova (D-At Large), the chair of Fairfax County’s Board of Supervisors, has associated the proposed shelters with family separation while stopping short of outright opposition.

In fact, the shelters have nothing to do with family separation. That abhorrent policy ended last year; the vast majority of migrant children currently in shelters entered the country unaccompanied. Nor are they “warehouses.” Existing shelters, scattered in 23 states including Virginia, provide a range of services, including English instruction, health care, counseling, access to legal aid and recreation — just as they did during the Obama administration.

The opposition does not withstand scrutiny. The shelters are not an outgrowth of the Trump administration’s odious immigration policies; they’re a preexisting cog in the machinery for resettling migrant children. By blocking them, local officials would become part of the problem by contributing to future logjams and inhumane conditions at the border. That’s a bad outcome for those who profess to care about treating immigrants humanely.