In the Age of Trump, even landmark victories for civil rights will remain contested and tragically incomplete. Nowhere is that painful truth more clear than in US immigration policy – as demonstrated by legal fights unfolding in the wake of Trump’s latest order.

To be sure, the first battle over Donald Trump’s executive order on immigration and refugees was a clear defeat for the administration. Citizens and judges recoiled from its policy, which reeked of anti-Muslim prejudice, unleashed chaos, lacked a basis in national security and consigned innocents to certain death.

This backlash – coupled with an aura of lawlessness in Trump’s White House – emboldened the courts. Invoking extraordinary precedent, they pierced the deference that ordinarily shields executive action on immigration. Their opinions relied on due process and religious liberty to halt Trump’s policy.

It is difficult to overstate the importance of those rulings.

Not only did courts block enforcement of an illegal order, but they also changed the state of play. For all his fury, Trump was finally checked and balanced. His political opponents rallied, and many Americans suddenly grasped – in an intense, personal way – why the rule of law matters. Flush with support, civil rights groups armed themselves for the years ahead, and journalists braced for a protracted defense of facts. The White House retreated from many other aggressive proposals, allowing experts to weigh in.

Judicial resistance to his immigration order thus broke Trump’s rapid pace, allowing civil society to find its footing. As the nation recovered, a series of leaks and scandals that might otherwise have been lost in the shuffle got well-deserved attention.

But the president is vested with broad power, especially over immigration and refugee policy. The rulings enjoining Trump’s initial order identified specific flaws, but they did not (and could not) deny that he has broad authority to address these issues.

On Monday, Trump again exercised that prerogative, issuing a revised executive order that temporarily bars entry by citizens of six Muslim-majority countries.

The revised order capitulates on several key points. It does not apply to Iraq. Syrians are banned only for 90 days, rather than indefinitely. The order does not favor religious minorities. And it exempts green card holders, those who already hold visas, dual-nationals with a passport from a non-covered country, those who have been previously granted asylum or refugee status and those protected by the Convention Against Torture.

Further, the order vests broad discretion in officers to waive the ban on a case-by-case basis. And it identifies many scenarios where such waivers may be proper – eg cases in which an applicant has significant contacts in the US, is visiting a close family member who is a US citizen or resident, is employed by the US or has been of service to it, or is a young child or infant.

These changes matter. They address many of the due process concerns raised by the ninth circuit court of appeals, and remove some especially terrible aspects of the original policy.

But ultimately, the order remains wholly indefensible on moral and policy grounds – and may fail to pass constitutional muster, too.

The most basic problem with the order is that is lacks any valid justification. It arbitrarily cuts the total intake of refugees for fiscal year 2017 from 110,000 to 50,000, in effect (and needlessly) condemning thousands to death or torture. It bars entrants from six countries even though no American has been killed by immigrant terrorists from those particular countries. And it ham-handedly achieves Trump’s conceded goal of using immigration law to make an anti-Muslim political statement.

For these and other reasons, virtually every serious analyst has concluded that the order makes America less safe, harms our counter-terrorism efforts, and tarnishes our global image.

That conclusion is supported by leaked reports from within the executive branch, which cast doubt on the revised order’s own factual assertions and expose a shameful effort to manufacture evidence for a predetermined outcome.

Skepticism of the revised executive order is also supported by the administration’s recent conduct: after insisting in court that its original order had to go into effect immediately – due to imminent (but secret) threats – the administration has slow-walked its revision, reputedly to let Trump enjoy good media coverage after his recent address to Congress. Will Trump’s lawyers now insist that swift implementation of the order is a matter of life and death? Would anyone believe such claims?

Further, the stated purpose of the ban is to freeze entry so that the administration can establish “extreme vetting” procedures. Yet Trump has never identified any actual defect in the existing system – not during his campaign, and not since issuing a 90-day freeze back in January, supposedly for the same purpose.

All said and done, Trump’s new order will cause severe and widespread human suffering, harm American interests at home and abroad, and undermine Trump’s own credibility in national security matters. It is arbitrary and it is immoral.

There is a difference, though, between bad and unlawful. And it is hard to say whether the new order will withstand judicial scrutiny. Perhaps the best remaining argument is that Trump’s whole immigration/refugee program is rotten to its core, corrupted by a forbidden effort to discriminate against Muslims. Trump’s advisers have aided this claim by insisting – publicly and vocally – that “fundamentally, you are still going to have the same, basic policy outcome for the country”.

Understandably, though, courts are slow to find that an official acted for evil reasons. While Trump has dispelled part of that wariness by publishing his illegal motives on Twitter, judges may still afford his revised order some of the deference that presidents usually enjoy. Certainly, Trump’s lawyers will argue that the link between his earlier comments and the revised policy is too attenuated for a finding of improper purpose.

And so the fight will continue in courtrooms across the country.

In the meantime, yet another disaster of historic propositions will unfold in US public policy: Trump’s vast expansion of deportation and immigration enforcement programs at all levels of government. This radical transformation includes efforts to brand all undocumented migrants as criminals, and to relegate millions of people to lives of constant, crushing fear. In the coming years, Trump will build and expand prisons, allow ever more “expedited hearings”, and fill the books with novel grounds for ripping apart migrant families.

In halting Trump’s original executive order, lawyers achieved a victory of the first order. Their efforts saved many lives and awakened powerful political energies. But as will often be true under Trump, that victory was partial and incomplete. This country’s immigration policy remains on a dark, disturbing path.

The powers of the presidency are vast. Each day will bring new struggles to protect civil rights and preserve the rule of law. It is incumbent on all of us to do whatever we can to safeguard the constitution and help those harmed by Trump’s policies.

There is no other way.