Seeking to regroup after a stinging legal defeat, U.S. President Donald Trump said Friday he is considering signing a "brand new order" after his refugee and immigration travel ban was halted in court.

Trump, speaking to reporters on Air Force One as he flew to Florida for the weekend, said he expected his administration to win the legal battle over his original directive. But he said the White House was also weighing other alternatives, including making changes to the order, which suspended the nation's refugee program and barred all entries from seven Muslim-majority countries.

The president said a new executive order would likely change "very little" from the first.

Trump's comments came a day after the 9th U.S. Circuit Court of Appeals upheld a restraining order on the original travel ban. A White House official suggested the administration was not planning to immediately ask the Supreme Court to overturn that order and would instead argue for its constitutionality in the lower courts, though the official cautioned that the next steps were not finalized and could change.

The official was not authorized to discuss the matter publicly and insisted on anonymity.

SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE! —@realDonaldTrump

Trump's executive order was hastily unveiled at the end of his first week in office. It caused chaos at airports in the U.S. and sparked protests across the country.

The president has cast the order as crucial for national security. Earlier Friday, he promised to take action "very rapidly" to protect the U.S. and its citizens in the wake of the appeals court decision, but he did not specify what steps he planned to take.

"We'll be doing things to continue to make our country safe," Trump pledged at a news conference with Japanese Prime Minister Shinzo Abe. "It will happen rapidly. We will not allow people into our country who are looking to do harm to our people."

Trump and Japanese Prime Minister Shinzo Abe hold a joint news conference in the East Room of the White House on Friday. 'We'll be doing things to continue to make our country safe,' Trump pledged. (Carolyn Kaster/Associated Press)

The president's comments were far more restrained than his angry reaction to last week's initial court ruling blocking the travel ban. Trump took aim at both the "so-called judge" in that case and the ruling, which he called "ridiculous."

Trump continued to conjure images of unspecified danger Friday, saying he had "learned tremendous things that you could only learn, frankly, if you were in a certain position, namely president. And there are tremendous threats to our country. We will not allow that to happen, I can tell you that. We will not allow that to happen."

The 9th Circuit ruling represented a significant setback for Trump in just his third week in office. The appellate decision brushed aside arguments by the Justice Department that the president has the constitutional power to restrict entry to the U.S. and that the courts cannot second-guess his determination that such a step was needed to prevent terrorism.

The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned! —@realDonaldTrump

Trump urged to abandon travel ban

Senate minority leader Chuck Schumer tweeted 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 that "Democrats will continue to press for President Trump's dangerous and unconstitutional ban to be withdrawn." And Trump's former presidential rival Hillary Clinton offered a terse response on Twitter, noting the unanimous vote: "3-0."

Pres Trump ought to see the writing on the wall, abandon proposal, roll up his sleeves & come up w/ a real, bipartisan plan to keep us safe. —@SenSchumer

Congress's Republican leaders, House Speaker Paul Ryan and Senate majority leader Mitch McConnell declined to comment.

U.S. District Judge James Robart in Seattle issued the temporary restraining order halting the ban 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.

A demonstrator protests outside the 9th U.S. Circuit Court of Appeals courthouse in San Francisco on Tuesday. The three judges of the 9th U.S. Circuit Court of Appeals unanimously ruled to uphold the suspension of Trump's travel ban. (Noah Berger/Reuters)

Trump and his aides frequently refer to a ruling by a federal judge in Boston who declined last week to extend a temporary injunction against Trump's travel ban. In a separate federal ruling in Seattle, a different federal judge put the ban on hold nationwide; it is that judge's decision that the White House has challenged.

"It's a decision that we'll win, in my opinion, very easily and, by the way, we won that decision in Boston," Trump said.