The Trump administration announced last week it will terminate the Flores settlement agreement, a 1997 court decree that has prevented U.S. officials from detaining migrant families and unaccompanied minors for more than 20 days. Media coverage predictably—and inaccurately—warned of “indefinite detention” for families and children caught crossing the southwest border.

But ending the settlement was the right call. More than any other single policy, it has created a magnet for illegal immigration, essentially guaranteeing entry...