Ali Noorani is executive director of the National Immigration Forum and author of “There Goes the Neighborhood: How Communities Overcome Prejudice and Meet the Challenge of American Immigration.”

The Trump administration’s decision to implement a policy that separated children from their parents was as morally reprehensible as it was politically reckless. That two-thirds of a polarized country finds the policy unacceptable, according to a recent CBS News poll, tells us how the move is playing in Peoria.

So, it is good that the president has reversed a decision he never should have made.

But what has been lost in the barrage of harrowing images, disturbing audio recordings and nightly news stories is serious discussion about sensible alternatives and what happens next.

Let’s be clear: Family detention is not the best alternative to family separation.

Family detention wasn’t right when President George W. Bush did it, it wasn’t right when President Barack Obama did it, and it won’t be right as President Trump ramps up the new policy.

We know that detaining children in Department of Homeland Security facilities puts their health at risk and makes it much more difficult for detainees to gain legal counsel. Federal courts have limited the government’s ability to detain children, precisely because of these negative consequences — that’s why a 1997 legal agreement known as the Flores Settlement requires that children cannot be detained more than 20 days.

So what’s the alternative?

There are many options for moving families through the system in ways that are cost-effective, are better for the well-being of children and parents, and send a signal to the world that even in the Trump era, the United States can balance its moral compass with its adherence to following the rule of law.

The recently terminated family case management program connected social workers with asylum-seekers — those who must make a persuasive case that they fear returning to their country of origin — to provide them with legal support and assist them in finding housing, health care and schooling for their children. Critics may say that if we go this “catch and release” route, then people will run from the authorities after they enter the United States. But that’s simply not true: 99 percent of the case management program’s participants successfully attended court appearances and Immigration and Customs Enforcement (ICE) check-ins, according to an executive at the GEO Group, which ran the program. And 84 percent complied when being removed from the country.

Rather than detaining people in “cages” or former big-box stores, we could take a more humane and cost-effective approach to monitoring those awaiting their day in court. These could include telephonic and in-person meetings, curfews or home visits. For those who are deemed a greater flight risk, ICE could use electronic monitoring or require the posting of a bond (though these have serious drawbacks, too).

If the government detained only those individuals convicted of serious crimes, U.S. taxpayers would be saved approximately $1.44 billion per year.

This non-detention approach is quite common. Many Americans facing pretrial criminal justice are not held in detention facilities. They are in their own homes, often caring for their children.

Finally, let’s remember that neither family separation nor detention discourages Central American migrants who are escaping violence, poverty and hunger. The Trump administration may have imagined that it was deterring migrants with its callous policy, but that was misguided. The number of “unaccompanied” migrant children increased from 4,302 in April to 6,405 in May, after family separation was implemented. Compared with a year earlier, the numbers are significantly higher.

Christian evangelist Franklin Graham was right to call the practice of separating families “disgraceful.” To make up for this embarrassing and inhumane policy, let’s do better than return to other problematic policies.

Trump’s executive order puts the spotlight on Congress, where it has belonged all along. Lawmakers now have an opportunity to prevent family separation and all detention of children, and to employ alternatives that have proved successful and would save taxpayers hundreds of millions of dollars.

In so doing, Congress would prove that the United States can be both a nation of laws and a nation of grace.