The Ninth Circuit Court of Appeals dealt President Trump a major blow on Thursday by rejecting his request to lift a lower court’s nationwide injunction against his immigration and travel ban. But that’s not the end of the legal saga.

Trump still has multiple legal options he could pursue to enact his policy of temporarily barring refugees and travelers from seven Muslim-majority countries from entering the United States. Each one carries its own challenges and possibilities. Here’s a quick rundown of the paths he could pursue.

An appeal to the U.S. Supreme Court

The Trump administration could petition the entire Ninth Circuit to overturn the panel’s decision in what’s called an en banc hearing. But with more than two-thirds of the appeals court’s judges appointed by Democratic presidents, he would be unlikely to succeed. A likelier option to overturn the temporary restraining order, or TRO, would be to appeal directly to the U.S. Supreme Court. A ruling in Trump’s favor there would not only lift Judge James Robart’s TRO blocking the core provisions of the executive order, but could also dissuade lower courts throughout the country from issuing similar injunctions.

But Trump would face an uphill battle to win over the Court. Five votes would be needed to reverse the Ninth Circuit’s decision and lift Robart’s TRO, and there are currently only eight justices. A 4-4 split among the Court’s members would leave the Ninth Circuit’s ruling intact by default. And it’s not guaranteed Trump would receive all four votes from the Court’s conservative wing, either. Both Robart, who issued the initial TRO, and Judge Richard Clifton, who was one of the three judges on the Ninth Circuit panel that upheld it, were nominated to the bench by President George W. Bush.

Keep fighting the case in the district court

Were Trump to take this route, both parties would return to the Robart’s trial court in Seattle for further proceedings. That would include a second chance for the federal government to lift the TRO. Judge James Robart issued the TRO last Friday to preserve the status quo before the executive order was issued until he could hear arguments on a preliminary injunction, which would last for the duration of the trial. From there, the federal district court in Seattle would then begin to weigh the merits of the case.

That could be more favorable ground for the federal government than the debates over whether the order should be temporarily blocked. Congress and the executive branch have typically received broad leeway from the courts when crafting immigration laws and policies in general, giving Trump an advantage on the merits. It would also give the Justice Department more time to present evidence to justify the order, lack of which was criticized by the Ninth Circuit panel on Thursday and a federal judge overseeing a related lawsuit in Virginia on Friday.

Rewrite the executive order

NBC News reported Friday that White House lawyers have begun drafting a new version of the January 27 executive order. The current order suspends the U.S. Refugee Admissions Program for 120 days, indefinitely blocks the admission of Syrian refugees, and bars the entry of immigrant and non-immigrant travelers from seven Muslim-majority countries while federal agencies conduct a security review. It’s not clear what changes would be made in a new order or whether President Trump would sign it.

The benefits for the executive branch would be obvious. Multiple reports suggested the current order was drafted entirely within the White House with limited input from other federal stakeholders, including the State Department and Department of Homeland Security. The Justice Department’s Office of Legal Counsel signed off on the order, but only offered a cursory review of its legality and constitutionality. A more thorough process could allow the administration to draft a more targeted order with a deeper body of supporting evidence to offer reviewing courts.

Some obstacles could be harder to overcome. The Ninth Circuit panel declined to consider whether the order had violated the First Amendment’s religious-freedom protections because it had already sided with the states on due-process grounds. But the judges did note the state had provided evidence that Trump and his associates intended to implement a “Muslim ban.” Under long-standing Supreme Court precedents, courts can use those kinds of statements as evidence to determine whether a law or act discriminates on the basis of religion. That could haunt similar executive orders, even if they are more narrowly written than the current one.

And the most significant hurdle may be personal. Rewriting the executive order would essentially concede the original one was flawed at best and unconstitutional at worst. For Trump, whose rise to power was built on perceptions of steadfast judgment and an unwillingness to back down, the impulse to fight could prevail.