Donald Trump’s second executive order banning travel from six majority-Muslim countries was slated to go into effect on Thursday at 12.01am EST. But in the hours before it was set to take effect, it was blocked.

What just happened?

Judges in two federal courts have temporarily stayed Trump’s second travel ban, marking a huge setback for the Trump administration. The rulings are the second time that courts have blocked a version of this executive order – the revised ban was issued after a first attempt was chaotically rolled out and blocked by a different federal court in Washington state. Trump’s second executive order was carefully reviewed and streamlined in an attempt to withstand similar legal challenges, but these rulings have laid waste to that vetting.

Nonetheless, both the rulings on the second order are temporary as the “merits” of the cases have not been fully argued yet. They have found that Trump’s order could “likely” violate the constitution, and blocked it from taking effect while they decide.

This gives the government long routes for appeal, which Trump himself and the justice department have indicated they will pursue. But until a court rules otherwise, Trump’s order will remain blocked and will not go into effect.

What will the administration do next?

The Trump administration will unquestionably challenge the court orders in Maryland and Hawaii , but the department of justice has not yet said where, when, and how it will play its next card.

The “where” is significant as the administration is now effectively fighting nationwide rulings in different areas of the country, meaning there are avenues to challenge in one separate appeals circuit or in both. The “when” is also important as there are still a number of other similar challenges in front of other federal courts that have yet to be ruled on. The administration could wait to see if one of these cases results in a more favourable ruling for them, which would probably be cited during appeals to the existing orders.

This leads to the “how”. It is probable that the administration will seek to quickly challenge the Hawaii order as it is the broadest of the two. It blocks two entire sections of the executive order that relate to refugee resettlement and visa issuances from six Muslim-majority countries, rather than just one clause of the order, as the Maryland judgment does.

This means the appeal will end up in the ninth circuit, the same court that upheld the order against Trump’s ban in a unanimous verdict last month.

If a ruling in that court maintains the Hawaii order, Trump has indicated he would take the case “as far as it will go”. This means the supreme court, currently comprising only eight judges as Trump awaits confirmation of his pick for the ninth spot, Neil Gorsuch, a conservative. A split ruling there could be catastrophic for Trump as it will uphold any decision made in the appeals court. This means he may wait until Gorsuch is confirmed or pursue a full hearing in the ninth circuit instead.

Will Trump reinstate the first order as he said last night?

At a rally in Nashville on Wednesday evening Trump branded the Hawaii ruling as “unprecedented judicial overreach”. He went on to suggest he may “go back to the first one and go all the way”, a nod to reinstating the first executive order, which has already been blocked after it was chaotically ruled out in January. Such a move would lead to yet more chaos and would probably frame the administration in a state of complete disarray.

Further, said Professor Carl Tobias, at the University of Richmond’s department of law, it could harm the administration’s legal appeals going forward. As a result, it seems unlikely Trump will follow through with this off-the-cuff remark.

“His renewed attacks on judicial independence are troubling and do not help his case or respect the courts or separation of powers,” added Tobias.

Will Trump and his associates’ comments about the new ban affect future rulings?

Yes. Judge Watson in Hawaii leaned heavily on past comments made by Trump on the campaign trail as evidence of the “religious animus” contained within the order. Watson also made reference to statements by administration officials after the first ban was blocked, which presented the second order as a continuation of the first.

Further, in an act some have described as self-sabotage, Trump last night described the second order as a “a watered-down version of the order that was blocked by another judge and should never have been blocked to start with”. Some legal scholars think these comments could remain crucial in showing Trump’s intent to engage in unconstitutional discrimination.

But professor Jonathan Turley, a professor of law at the George Washington University, suggests that precedent may eventually favour the Trump administration if the case makes it to the supreme court.

But even that comes with caveats: “That is not to say that the administration cannot continue to deliver self-inflicted wounds,” Turley said. “The continued public comments cited by the court shows a lack of discipline. It is a problem when government officials are throwing red meat to audiences while government lawyers are talking like vegans to the courts.”

What other cases are ongoing against the ban?

There are numerous other cases filed against Trump’s second order that vary in scope and some of which, confusingly, still target the first order.

The most significant are two lawsuits filed in the state of Washington against the second ban. These are both presided over by district judge James Robart in Seattle, who issued the temporary restraining order against Trump’s first ban. In one case, a coalition of Democratic states have asked Robart to issue a temporary restraining order against Trump’s the new order, citing similar arguments to the Hawaii case. In the other, which was heard before Robart yesterday afternoon, a refugee advocacy group also made similar arguments.

If Robart rules in favour of either of these two cases it will deal yet another blow to the administration.

The Hawaii ruling was also not the first court decision to successfully challenge Trump’s second travel ban. A judge in Wisconsin ruled last Friday that the order could not be applied to members of a Syrian family seeking to reunite in the US. The ruling, again a temporary restraining order, only applied to the family and not to the entire order.