This editorial has been updated to reflect news developments.

The United States needs an immigration policy that combines border security, justice and humanity. No one with a conscience can look at the photo of an asylum seeker and his 23-month-old daughter lying dead on the bank of the Rio Grande and accept the status quo.

That single tragedy, reminiscent of the photo of a drowned Syrian boy washed up on a Turkish beach in 2015, has the power to clarify a vast, long-running problem that has already claimed many lives. What it should also do is prompt urgent action from the country’s elected representatives to compromise over their many differences and resolve a stalemate that is no longer tolerable.

President Trump has made agreeing on an approach to immigration in the United States more difficult. He has done so by systematically creating a false narrative of immigrants as job-stealing criminals, by insisting that there is a crisis of illegal immigration where there is none and, most maliciously, by dreaming up schemes to torment these people in the perverse notion that this will deter others from trying to reach the United States.

The most appalling of these has been the separation of children from their parents and detaining them in conditions no child anywhere should suffer, and certainly not children in the care of the American government. At a recent hearing before a federal appeals court in San Francisco, judges were stunned by the administration’s arguments that children sleeping on concrete floors in frigid, overcrowded cells, without soap or toothbrushes, were being kept in “safe and sanitary” facilities, as required by law. “You’re really going to stand up and tell us that being able to sleep isn’t a question of safe and sanitary conditions?” asked one judge. (John Sanders, acting commissioner of Customs and Border Protection, the agency responsible for temporarily housing the migrant children, announced Tuesday that he would be leaving his post at the end of next week.)