President Donald Trump stepped up his criticism of the judicial system on Wednesday, saying courts seem to be "so political," a day after his travel ban on people from seven Muslim-majority countries faced close scrutiny from an appeals court.

A three-judge panel of the San Francisco-based 9th U.S. Circuit Court of Appeals on Tuesday heard arguments on the Trump administration's challenge to a lower court order putting his temporary travel ban on hold. The appeals court is expected to issue a ruling as soon as Wednesday.

"I don't ever want to call a court biased," Trump told a few hundred police chiefs and sheriffs from major cities at a meeting in Washington. "So I won't call it biased. And we haven't had a decision yet. But courts seem to be so political. And it would be so great for our justice system if they would be able to read the statement and do what's right.

"I think it's a sad day. I think our security's at risk today," Trump said.

Trump's Jan. 27 order barred travelers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entering for 90 days and all refugees for 120 days, except those from Syria, whom he would ban indefinitely. He said his directive was "done for the security of our nation, the security of our citizens."

The appeals court must decide if Trump acted within his authority or whether his directive was tantamount to a discriminatory ban targeting Muslims. The appeals court judges questioned whether the directive improperly targeted people because of their religion.

"If these judges wanted to, in my opinion, help the court in terms of respect for the court, they'd do what they should be doing," the Republican president said.

Last week Trump labeled the judge who put his directive on hold, U.S. District Judge James Robart of Seattle, who was appointed by former President George W. Bush, a "so-called judge." Last year Trump sharply attacked a judge who was presiding over a case involving one of his businesses.

In a Twitter post earlier on Wednesday, Trump wrote, "If the U.S. does not win this case as it so obviously should, we can never have the security and safety to which we are entitled. Politics!"

During an oral argument lasting more than an hour on Tuesday, the appeals court panel in San Francisco pressed an administration lawyer over whether the Trump administration's national security argument was backed by evidence that people from the seven countries posed a danger.

At the meeting with law enforcement officials, Trump read from the law he used to justify the travel ban, quoting it in fragments and sprinkling bits of interpretation in between. He said the law clearly allowed a president to suspend entry of any class of people if he determines would be a detriment to national security.

"A bad high school student would understand this," Trump said. "Anybody would understand this."

Judge Richard Clifton, who was appointed to the bench by Bush, posed equally tough questions for a lawyer representing Minnesota and Washington states, which are challenging the ban.