After a federal judge placed an immediate halt on President Donald Trump’s latest iteration of his travel ban Wednesday, the president wasted no time vowing to challenge the ban in the nation’s highest court.

“This ruling makes us look weak ― which, by the way, we no longer are, believe me. Just look at our borders,” Trump said at a rally in Tennessee Thursday. “We are going to fight this terrible ruling. We’re going to take our case as far as it needs to go, including all the way up to the Supreme Court. We are going to win.”

Read: Ruth Bader Ginsburg's Health: Will There Be Another Vacancy On The Supreme Court?

The ban stopped the entry of people from six Muslim-majority countries — Iran, Libya, Somalia, Sudan, Syria and Yemen — for 90 days. It also suspended the entry of refugees for 120 days. The latest version of the executive order, which was signed in early March, was a toned-down version of Trump’s original travel ban from January.

Still, U.S. District Judge Derrick Watson from Hawaii ruled against the ban Wednesday, saying "a reasonable, objective observer ... would conclude that the executive order was issued with a purpose to disfavor a particular religion."

Read: Is Trump’s Travel Ban Legal? Elizabeth Warren Says ‘Muslim Ban’ Will Aid ISIS Recruitment

A second judge from Maryland, U.S. District Judge Theodore Chuang, also created more trouble for Trump’s executive order early Thursday morning. He issued a nationwide preliminary injunction — in other words, a court order that instructed U.S. agencies to stop enforcing the ban, and he, too, said the ban would violate the people’s constitutional right to freedom of religion.

"To avoid sowing seeds of division in our nation, upholding this fundamental constitutional principle at the core of our nation's identity plainly serves a significant public interest," Chuang wrote in his ruling.

Trump claimed the court rulings were an overreach of power for the judicial system. If Trump does challenge the judges’ orders and it reaches the Supreme Court, the fate of his executive order will likely be contentious. Currently, the court is divided between liberals and conservative justices — and that will remain the case, even if nominee Neil Gorsuch is confirmed by Congress.

Below is a brief breakdown of the Supreme Court justices' ideological leanings:

  • Elena Kagan — liberal, appointed by President Barack Obama in 2010
  • Sonia Sotomayor — liberal, appointed by Obama in 2009
  • Ruth Bader Ginsburg — liberal, appointed by President Bill Clinton in 1993
  • Stephen Breyer — liberal, appointed by Clinton in 1994
  • Clarence Thomas — conservative, appointed by President George H.W. Bush in 1991
  • Samuel Alito — conservative, appointed by President George W. Bush in 2006
  • John Roberts — conservative, appointed by the younger Bush in 2005
  • Anthony Kennedy — moderate conservative who’s often had swing votes, appointed by Reagan in 1988

If Gorsuch is confirmed, he would tip the scales of the Supreme Court to the conservative side. But that still doesn’t guarantee that justices would rule on the side of Trump’s executive order. The job of the Supreme Court, after all, is to decide whether the travel ban is constitutional, not to succumb to partisan politics.