President Trump has weathered one week after another of controversy, missteps and turmoil. None quite compares with what he experienced with the storm over his policy to separate migrant children from their parents. It was a trifecta of ineptitude: a policy hash, a political debacle and the most dramatic personal step-down of his presidency.

Not since the rollout of his original travel ban in the opening days of his presidency has a policy — two policies actually — been put in place with such haste and lack of planning. Put aside the contradictory and conflicting descriptions by administration officials (it was a deterrent; no, it was not a deterrent; it was policy; no, it was not policy): The decision to enforce “zero tolerance” and then suddenly undo it provided a textbook example of how not to govern.

Attorney General Jeff Sessions declared the administration’s intentions when he announced the zero-tolerance policy in May, indicating that parents coming across the U.S.-Mexico border illegally would face criminal prosecution and the possibility of being separated from their children.

Amid rising criticism, he said in a June interview with radio talk show host Hugh Hewitt: “It’s certainly not our goal to separate children, but I do think it’s clear, it’s legitimate to warn people who come to the country unlawfully bringing children with them that they can’t expect that they’ll always be kept together.”

Last week, as the policy was being reversed, he said in an interview with David Brody of the Christian Broadcasting Network, “It hasn’t been good, and the American people don’t like the idea that we are separating families. We never really intended to do that.” And yet they did it.

That gives an insight into how the policy was launched, with what was intended to be a clear warning and with a later admission that what border enforcement officials did in taking children and detaining them separately from their parents was never intended. If there is a way to square that circle, neither Sessions nor Homeland Security Secretary Kirstjen Nielsen has found a way to do it.

An even worse example of how not to implement policy was what happened when the president reversed course, signing an executive order to undo the policy after saying he had no power to change it. The reports of mass confusion, at the border and inside the administration, have been cascading since.

Government officials have provided conflicting and inconsistent explanations of what the new policy means, and lawyers working on behalf of separated families have found themselves both outraged and discouraged as they try to make sense of things. Meanwhile, the process of trying to reunite children and parents remains a nightmare, as does the potential long-term damage to the traumatized children.

Politically, this has been a dark hour for Republicans, who are already nervous about what could happen to them in the November midterms. As the media’s coverage of the story intensified and the outcries of citizens across the political spectrum and around the world grew louder, Republicans found themselves trapped in a cage of their own, one of the president’s making.

Their expressions of disagreement, their palpable appeals for Trump to change course, underscored not just their personal reactions as parents or grandparents to the sights and sounds of sobbing children, but also the recognition that the longer the policy remained in place, the more political damage they could suffer as a party.

A woman holds her child during a “Save the Children” rally against the Trump administration’s border policy at Leimert Park in Los Angeles on Friday. (Mike Nelson/Epa-Efe/Rex/Shutterstock)

Even in a party whose elected officials have been reluctant to challenge the president publicly, this episode provided an exception to the rule. Political survival and human decency combined to raise the volume from the GOP.

In suburban battlegrounds especially, the migrant crisis threatens to further erode support for Republican candidates. Their House majority already in danger, they can ill afford to have the opposition even more energized by administration indifference and harshness.

The one hope for Republicans now is that public memories are short, and that issues come and go with blinding speed. If the media loses interest in the story, which is inevitable (does anyone remember that it was little more than a week ago when the world was focused on North Korea and the summit with Kim Jong Un?), voters could easily move on. Yet this story could continue to draw headlines as the process of reuniting families continues.

The president has remained defiant and in denial throughout. He defended the policy without defending it, insisting that it was the fault of others, namely Democrats. He insisted that changing the policy was out of his hands, that it required legislation. Either he didn’t understand what his administration had done or chose to make his arguments in the face of contrary facts.

He insisted and insisted that he was locked into the policy of zero tolerance that resulted in separating children, until even for him, the pressure became too much. Then he suddenly backed down — a rarity for an individual whose style and personality has long been to double down in the face of criticism, to fight harder and never admit error or mistakes.

In this case, however, he reversed course without backing down. He changed course without giving up the fight. He held an event Friday with families who have lost loved ones to crimes committed by undocumented immigrants, noting that they were “permanently separated” by those acts. On Saturday, he blasted out another series of tweets attacking Democrats and the media.

For Trump and for the Democrats, the immigration issue presents opportunities and risks. Democrats see opportunities at this moment to gain from the mistakes of the administration. They know that public opinion is on their side on the issue of the young, undocumented immigrants who arrived with parents who came to the country illegally, the Dreamers.

But immigration helped elect Trump as president. As both an economic issue and a cultural one, immigration provided Trump a way to express his America First philosophy. For many of his supporters, the issue encapsulates a belief that immigration, particularly illegal immigration, has changed the character of the country for the worse.

Those feelings are often intensely held, more intensely than those on the other side who see immigration as generally good for the country. In fact, a new Gallup poll found a record number of Americans (75 percent) saying that immigration is a good thing for the country. Majorities of Democrats, independents and Republicans agree on this question. But Trump recognizes that among his followers, the passions are probably deeper among those who think immigration is not good.

That’s why, in the face of defeat on the policy, he turned around and continued to hammer Democrats for favoring open borders and for being soft on protecting the country from undocumented immigrants who commit violent crimes and the drug and human traffickers who profit from the flows across the border.

Congressional Republicans recognize their vulnerabilities on immigration and so tried again this week to make themselves less vulnerable. But internal divisions once again have frustrated those efforts — and the president’s on-again, off-again tweets and statements about solving the issue legislatively or not bothering to try make those efforts nearly impossible.

For Trump, the question is whether he wants a solution, or whether he wants the issue. Even in defeat on one of the most controversial policies of his administration, he continues to signal that he wants to keep alive the broader issue. Attacking Democrats on immigration paid off for him in 2016. Will 2018 or 2020 bring something different? That remains unanswered as government officials and migrant advocates continue their efforts to reunite separated children with their parents.