Updated

President Trump on Wednesday brought the legal dispute over his immigration executive order into the court of public opinion, using a Washington law enforcement address to mount an urgent defense of the measure and urge the federal courts to reinstate it.

At a meeting with local sheriffs and police chiefs, the president said he issued the immigration order “for the security of our nation, the security of our citizens, so that people come in who aren't going to do us harm.”

He spoke after a hearing late Tuesday during which the Justice Department presented its arguments to the San Francisco-based 9th Circuit Court of Appeals.

The DOJ is fighting to overturn a Seattle judge’s decision to halt the controversial order that suspended the U.S. refugee program and immigration from seven mostly Muslim countries: Iraq, Iran, Syria, Yemen, Libya, Somalia and Sudan. A decision could come at any time.

"We're in an area where, let's just say, they are interpreting things differently from probably 100 pecent of people in this room," Trump said.

Trump read out parts of the federal law outlining presidential powers on the subject, saying it was written clearly and "beautifully.”

The part of the U.S. Code he read specifies that when the president "finds that the entry of any aliens or of any class of aliens into the United States would be detrimental to the interests of the United States, he may by proclamation ... suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate."

“A bad high school student would understand this,” he said.

Trump said he listened to the judges Tuesday and, while vowing not to comment specifically on the hearing, said: "I listened to a bunch of stuff last night on television that was disgraceful, it was disgraceful."

Supporters of Trump's order say it will help keep America safe from terrorists looking to infiltrate the United States from terror hotspots that often have inadequate vetting procedures. Opponents have argued it is unconstitutional and discriminatory – claiming that it is a “Muslim ban.”

During Tuesday's hearing, Washington state Solicitor General Noah Purcell argued that Trump campaign statements about a Muslim ban showed discriminatory intent.

"There are statements that we've quoted in our complaint that are rather shocking evidence of intent to discriminate against Muslims, given that we haven't even had any discovery yet to find out what else might have been said in private," Purcell said.

Trump has waded into the legal battle before, largely on Twitter. He recently called the judge who halted the order, James Robart, a “so-called judge” and earlier Wednesday warned on Twitter that, “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.”

At the meeting with police chiefs, he indicated he would be ready to criticize the appeals court if it ruled against his administration.

"I don't ever want to call a court biased, so I won’t call it biased and we haven’t had a decision yet, but courts seem to be so political," he said. “It would be so great for our justice system if they were able to read a statement and do what’s right and that’s to do with the security of our nation, which is so important.”

He warned that until the issue was resolved, the nation's security would be at risk.

"I think it's sad, I think it's a sad day," he said. "I think our security is at risk today and it will be at risk until such time as...we get what we are entitled to as citizens of this country."

The Associated Press contributed to this report.