WASHINGTON — President Donald Trump vowed Thursday to contest a federal appellate court decision refusing to reinstate his ban on travelers from seven Muslim-majority nations, tweeting, “SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!”

The White House did not immediately comment on the merits of the unanimous decision issued by the San Francisco-based 9th U.S. Circuit Court of Appeals. The court declined to block a lower-court ruling that suspended the ban and allowed previously barred travelers to enter the U.S.

SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE! — Donald J. Trump (@realDonaldTrump) February 9, 2017

The ruling represented a setback for Trump’s administration and the second legal defeat for the new president in the past week. Trump’s decision to sign the executive order late last month has sparked protests at airports around the world as authorities barred scores of travelers from entering the country amid confusion over how to implement the details.

The appellate decision brushed aside arguments by the Justice Department that the president has the constitutional power to restrict entry to the United States and that the courts cannot second-guess his determination that such a step was needed to prevent terrorism.

Senate Minority Leader Chuck Schumer tweeted Thursday that Trump “ought to see the writing on the wall” and abandon the proposal. The New York Democrat called on the president to “roll up his sleeves” and come up with “a real, bipartisan plan to keep us safe.”

House Democratic leader Nancy Pelosi of California promised, “Democrats will continue to press for President Trump’s dangerous and unconstitutional ban to be withdrawn.”

In an off-camera response, President Donald Trump told reporters Wednesday night that the U.S. appeals court ruling on his executive order was a “political decision.” Video by Justin Scuiletti/PBS NewsHour

U.S. District Judge James Robart in Seattle had issued a temporary restraining order halting the ban last week after Washington state and Minnesota sued, leading to the federal government’s appeal.

The Trump administration has said the seven nations — Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen — have raised terrorism concerns. The states have argued that the executive order unconstitutionally blocked entry based on religion and the travel ban harmed individuals, businesses and universities.

The president, in his third week in office, has criticized the judiciary’s handling of the case. Last weekend, he labeled Robart a “so-called judge” and referred to the ruling as “ridiculous.” Earlier this week he accused the appellate court considering his executive order of being “so political.”

Trump’s Supreme Court nominee, Judge Neil Gorsuch, has referred to the president’s comments as “demoralizing and disheartening,” according to a Democratic senator who asked him about Trump’s response.

It was not immediately clear if the White House would appeal the ruling to the U.S. Supreme Court or if it would seek to argue the merits of the order in the district court.

Read the full ruling below. The states said Trump’s executive order unconstitutionally blocked entry based on religion.

Ruling on State of Washington & State of Minnesota v. Trump by PBS NewsHour on Scribd