WASHINGTON/PALM BEACH, Fla (Reuters) - 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, Florida, shortly after the Justice Department filed a notice that it intends to appeal the order.

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.

“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.

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.

As the ban lifted, refugees and thousands of travelers 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.

The judge 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.

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.

U.S. immigration advocacy groups including the American Civil Liberties Union and International Refugee Assistance Project on Saturday in a joint statement 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. A U.S. State Department email reviewed by Reuters said the department is working to begin admitting refugees including Syrians as soon as Monday.

SEPARATION OF POWERS

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.

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. A Reuters/Ipsos poll this week showed 49 percent favored it while 41 percent did not.

Slideshow ( 12 images )

Wes Parker, a retiree from Long Beach, California, 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 and other cities.

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

Slideshow ( 12 images )

TRAVELERS MOVE WITH HASTE

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.

In Erbil, the capital of the Kurdish region of northern Iraq, Fuad Sharef and his family prepared to fly on Saturday to Istanbul and then New York before starting a new life in Nashville, Tennessee.

“I am very happy that we are going to travel today. Finally, we made it,” said Sharef, who was stopped from boarding a New York-bound flight last week.

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

Some travelers told Reuters they were cautious about the sudden change.

“I will not say if I have hope or not. I wait, watch and then I build my hopes,” said Josephine Abu Assaleh, 60, who was stopped from entering the United States after landing in Philadelphia last week with five members of her family.

“We left the matter with the lawyers. When they tell us the decision has been canceled, we will decide whether to go back or not,” she told Reuters in Damascus, speaking by telephone.

Virtually all refugees also were barred by Trump’s order, upending the lives of thousands of people who have spent years seeking asylum in the United States.

Friday night’s court decision sent refugee advocacy and resettlement agencies scrambling to help people in the pipeline.

Iraqi refugee Nizar al-Qassab, 52, told Reuters in Lebanon that his family had been due to travel to the United States for resettlement on Jan. 31. The trip was canceled two days before that and he was now waiting for a phone call from U.N. officials overseeing their case.

“It’s in God’s hands,” he said.