US President Donald Trump on Sunday renewed his verbal attack on a federal judge who temporarily put on hold his controversial travel ban last week on refugees and travelers from seven predominantly Muslim countries from entering the United States, which unleashed a wave of chaos and protests at US airports.

Trump’s order applied to Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen — Muslim-majority countries that the administration said raise terrorism concerns. The order caused confusion for many foreigners trying to reach the United States, and led to multiple court challenges.

“Just cannot believe a judge would put our country in such peril. If something happens blame him and court system. People pouring in. Bad!” Trump tweeted Sunday of US District Court Judge James Robart, appointed by President George W. Bush.

He followed with another tweet saying he had instructed the Homeland Security Department to check people coming into the country but that “the courts are making the job very difficult!”

A day earlier, Trump had called Robart a “so-called judge” whose “ridiculous” ruling “will be overturned.”

Members of Trump’s Republican Party scolded him for his Twitter attacks on teh judge and accused him of stepping over the line that separates the executive from the judiciary. To

Rebuffed in its bid for a quick reversal, the White House said Sunday it expected the courts to reaffirm the executive power and reinstate the ban. The case promised to extend into Monday at least, when fresh legal filings were due, and observers had no doubt the Supreme Court ultimately will have a say.

The San Francisco-based 9th US Circuit Court of Appeals, in a brief order overnight, denied the administration’s request to set aside Robart’s ruling that put a temporary hold on the ban nationwide.

The lawsuit by Washington state and Minnesota said Trump’s order harmed residents and effectively mandated discrimination. Their lawyers had until 2:59 a.m. EST Monday to submit briefs opposing the government’s request. The Justice Department then had a 6 p.m. EST deadline to respond.

“We’ll accomplish the stay and will win the case on the merits,” Vice President Mike Pence said.

Pence also defended Trump over the attacks on the judge, saying “the president can criticize anybody he wants.” Pence added that he believes the American people “find it very refreshing that they not only understand this president’s mind, but they understand how he feels about things.”

Vice President Mike Pence speaks at the Republican congressional retreat in Philadelphia, Thursday, Jan. 26, 2017. (AP Photo/Matt Rourke)

Vice President Mike Pence speaks at the Republican congressional retreat in Philadelphia, Thursday, Jan. 26, 2017. (AP Photo/Matt Rourke)

Whatever the outcome and however the case drags on, a president who was used to getting his way in private business is finding, weeks in to the jobs, obstacles to quickly fulfilling one of his chief campaign pledges.

“The president is not a dictator,” said Sen. Dianne Feinstein, D-Calif. “He is the chief executive of our country. And there is a tension between the branches of government.”

The government had told the appeals court that the president alone has the power to decide who can enter or stay in the United States, an assertion that appeared to invoke the wider battle to come over illegal immigration.

Congress “vests complete discretion” in the president to impose conditions on entry of foreigners to the United States, and that power is “largely immune from judicial control,” according to the court filing.

“We don’t appoint judges to our district courts to conduct foreign policy or to make decisions about the national security,” Pence said.

Anti-Trump protesters shout at supporters of US President Donald Trump during a rally near Trump Tower in Fifth Avenue, February 5, 2017 in New York. (AFP PHOTO / Bryan R. Smith)

Anti-Trump protesters shout at supporters of US President Donald Trump during a rally near Trump Tower in Fifth Avenue, February 5, 2017 in New York. (AFP PHOTO / Bryan R. Smith)

Feinstein, the top Democrat on the Senate Judiciary Committee, predicted the appeals court would not have the last word. “I have no doubt that it will go to the Supreme Court, and probably some judgments will be made whether this president has exceed his authority or not,” she said.

In his ruling, Robart said it was not the court’s job to “create policy or judge the wisdom of any particular policy promoted by the other two branches,” but to make sure that an action taken by the government “comports with our country’s laws.”

Trump’s criticism of Robart echoed campaign comments against a federal judge of Mexican heritage who was overseeing a lawsuit against Trump University. Justice Department lawyers could be called upon to answer for Trump’s words as the travel ban case makes it way through the courts.

“We all get disappointed from time to time at the outcome in courts on things that we care about,” said Senate Majority Leader Mitch McConnell, R-Ky. “But I think it is best to avoid criticizing judges individually.”

Sen. Ben Sasse, R-Neb., was blunter: “We don’t have so-called judges. We don’t have so-called senators. We don’t have so-called presidents. We have people from three different branches of government who take an oath to uphold and defend the Constitution.”

The State Department said last week that as many as 60,000 foreigners from the seven countries had had their visas canceled. After Robart’s decision, the department reversed course and said they could travel to the US if they had a valid visa.

Demonstrators sit down in the concourse and hold a sign that reads "We are America," as more than 1,000 people gather at Seattle-Tacoma International Airport, to protest President Donald Trump's order that restricts immigration to the US, Saturday, January 28, 2017, in Seattle. (Genna Martin/seattlepi.com via AP)

Demonstrators sit down in the concourse and hold a sign that reads “We are America,” as more than 1,000 people gather at Seattle-Tacoma International Airport, to protest President Donald Trump’s order that restricts immigration to the US, Saturday, January 28, 2017, in Seattle. (Genna Martin/seattlepi.com via AP)

The department also advised refugee aid agencies that refugees set to travel before Trump signed his order would now be allowed in.

The Homeland Security Department no longer was directing airlines to prevent visa-holders affected by Trump’s order from boarding US-bound planes. The agency said it had “suspended any and all actions” related to putting in place Trump’s order.

Pence appeared on ABC’s “This Week,” CBS’ “Face the Nation,” NBC’s “Meet the Press” and “Fox News Sunday. McConnell was on CNN, Feinstein spoke on Fox and Sasse was interviewed by ABC.