UPDATE: 8:10 p.m. EST — President Donald Trump said the appellate court decision against reinstating his travel ban was political and won’t be upheld by the U.S. Supreme Court.

“It’s a political decision,” Trump told NBC News, adding, “We have a situation where the security of our country is at stake. … We’re going to win the case.”

Trump said he had not discussed the case with Attorney General Jeff Sessions, who was sworn in earlier in the day.

Last week Trump fired Acting Attorney General Sally Yates for telling Justice Department attorneys not to defend the travel ban because she thought it was illegal.

In a tweet earlier this week, it appeared Trump was bracing for a loss.

Original story

A federal appeals court Thursday refused to strike down a lower court order blocking President Donald Trump’s ban on travelers from seven Muslim-majority countries, saying the interests of national security do not outweigh the hardships the ban imposes.

The 9th U.S. Circuit Court of Appeals in San Francisco in a unanimous ruling upheld a temporary restraining order issued in Seattle, preventing the administration from implementing the travel ban.

The president has pledged to take the issue to the U.S. Supreme Court.

Trump’s executive order barred travelers from Syria indefinitely and from Iran, Iraq, Libya, Somalia, Sudan and Yemen for 90 days. It also suspended the U.S. refugee program for at least 120 days. The order prompted says of protests at U.S. airports and caused chaos from travelers.

Trump has said the ban is only temporary and necessary to give U.S. officials time to develop “extreme vetting” protocols.

The court said it considered the public interest generally as well as national security interests.

“The public … has an interest in free flow of travel, in avoiding separation of families and in freedom from discrimination. We need not characterize the public interest more definitely than this; when considered alongside the hardships discussed above, these competing public interests do not justify a stay,” the court said.

The appeals court ruled on a suit filed by the states of Washington and Minnesota, challenging the executive order as a violation of federal law. U.S. District Judge James Robart issued an order Sunday blocking the ban and has since incurred Trump’s wrath.

Trump called Robart a “so-called judge” and later said the courts had been politicized.

The appellate court ruled the federal government “has not shown a likelihood of success on the merits of its appeal, nor has it shown that failure to enter a stay would cause irreparable injury, and we therefore deny its emergency motion for a stay.”

Thursday’s decision, however, does not address the merits of the case.

The suit cites three changes to immigration procedures affected by the order: the 90-day ban on travelers from six countries, the changes to the refugee program and the indefinite ban on Syrian travelers.

“The impact of the executive order was immediate and widespread,” the decision said. “It was reported that thousands of visas were immediately canceled, hundreds of travelers with such visas were prevented from boarding airplanes bound for the United States or denied entry on arrival, and some travelers were detained.”

The court rejected federal government arguments that the states had no right to sue and noted temporary orders like the one Robart issued are not normally appealable. It also rejected administration arguments that the court lacks jurisdiction to review the executive order.

Though the administration clarified the order, saying it does not block permanent U.S. residents from re-entering the country, the court said it “cannot rely upon the government’s contention that the executive order no longer applies to lawful permanent residents. The government has offered no authority establishing that the White House counsel is empowered to issue an amended order superseding the executive order signed by the president.” It also was unclear whether the change was binding.

On the issue of whether the executive order was directed against Muslims, the court said the administration failed to show the policy is not directed at a specific religious group.

Reaction to the court's decision was swift.