U.S. President Donald Trump said the Justice Department will win an appeal filed late Saturday of a judge's order lifting a travel ban he had imposed on citizens of seven mainly Muslim countries.

"We'll win. For the safety of the country, we'll win," he told reporters at his private Mar-a-Lago resort in Palm Beach, Fla., shortly after the Justice Department filed a notice that it intends to appeal the order.

Shortly after midnight, details of the appeal started to come out. The Justice Department warned the decision posed

an immediate harm to the public and thwarted enforcement of an executive order.

The appeal also claims the order "second guesses the president's national security judgement."

Trump's personal attack on U.S. District Judge James Robart in Seattle went too far for some, who said the president was undermining an institution designed to check the power of the White House and Congress.

As the ban lifted, refugees and thousands of travellers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen who had been stopped in their tracks last weekend by Trump's executive order scrambled to get flights to quickly enter the United States.

The Justice Department did not say when it would file its appeal with the Ninth Circuit U.S. Court of Appeals of the ruling made by Robart late on Friday that also lifted Trump's temporary ban imposed on refugee admissions.

Robart, appointed by former Republican President George W. Bush, questioned the constitutionality of Trump's order.

The three-judge panel that will decide whether to immediately block the ruling includes appointees of George W. Bush and two former Democratic presidents, Jimmy Carter and Barack Obama.

"The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned!" Trump said on Twitter early on Saturday. Trump has said "extreme vetting" of refugees and immigrants is needed to prevent terrorist attacks.

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

Interesting that certain Middle-Eastern countries agree with the ban. They know if certain people are allowed in it's death & destruction! —@realDonaldTrump

When a country is no longer able to say who can, and who cannot , come in & out, especially for reasons of safety &.security - big trouble! —@realDonaldTrump

Throughout the day, Trump continued to criticize the decision in tweets.

Late Saturday, Trump showed no signs of backing down. "The judge opens up our country to potential terrorists and others that do not have our best interests at heart. Bad people are very happy!" he tweeted.

The judge opens up our country to potential terrorists and others that do not have our best interests at heart. Bad people are very happy! —@realDonaldTrump

Trump's tweets criticizing the judge's decision could make it tougher for Justice Department attorneys as they seek to defend the executive order in Washington state and other courts, said Jonathan Turley, a law professor at George Washington University, adding that presidents are usually circumspect about commenting on government litigation.

"It's hard for the president to demand that courts respect his inherent authority when he is disrespecting the inherent authority of the judiciary. That certainly tends to poison the well for litigation," Turley said.

Canadian and American lawyers comment on Friday's court ruling that put a temporary halt to the U.S. president's executive order 2:26

It is unusual for a president to attack a member of the judiciary, which the U.S. Constitution designates as a check to the power of the executive branch and Congress.

Reached by email Saturday, Robart declined comment on Trump's tweets.

Democratic U.S. Senator Patrick Leahy of Vermont said in a statement Saturday that Trump's "hostility toward the rule of law is not just embarrassing, it is dangerous. He seems intent on precipitating a constitutional crisis."

"Read the 'so-called' Constitution," tweeted Representative Adam Schiff, the top Democrat on the House Intelligence committee.

This "so-called" judge was nominated by a "so-called" President & was confirmed by the "so-called" Senate. Read the "so-called" Constitution <a href="https://t.co/xQotyL1kHM">https://t.co/xQotyL1kHM</a> —@RepAdamSchiff

In an interview with ABC scheduled to air on Sunday, Vice-President Mike Pence said he did not think that Trump's criticisms of the judge undermined the separation of powers.

"I think the American people are very accustomed to this president speaking his mind and speaking very straight with them," Pence said, according to an excerpt of the interview.

The court ruling was the first move in what could be months of legal challenges to Trump's push to clamp down on immigration. His order set off chaos last week at airports across the United States where travelers were stranded and thousands of people gathered to protest.

Americans are divided over Trump's order.

Wes Parker, a retiree from Long Beach, Calif., held a sign saying "Trump is love" at the Los Angeles International Airport, and said he supported the tighter measures.

"We just have to support the travel pause," said Parker, 62. "If you were a new president coming in, wouldn't you want what you feel safe with?"

Rights groups, Democrats and U.S. allies have condemned the travel ban as discriminatory. On Saturday, there were protests against the immigrant curb in Washington, New York, Los Angeles, across Canada and in London, England.

About 3,000 protesters marched near Trump's Mar-a-Lago resort in Florida, where an International Red Cross fundraiser was taking place.

At the White House, hundreds of protesters chanted "Donald, Donald can't you see? You're not welcome in D.C."

A U.S. immigration lawyer says the odds are stacked against the Trump administration as it defends its controversial immigration policy 1:48

The sudden reversal of the ban catapulted would-be immigrants back to airports, with uncertainty over how long the window to enter the United States will remain open.

U.S. immigration advocacy groups including the American Civil Liberties Union on Saturday urged those with now valid visas from the seven nations "to consider rebooking travel to the United States immediately" because the ruling could be overturned or put on hold, while a U.S. State Department official said the department planned to admit refugees on Monday.

The Department of Homeland Security said on Saturday it would return to its normal procedures for screening travellers but that the Justice Department would file for an emergency stay of the order "at the earliest possible time."