Donald Trump REUTERS/Joshua Roberts
President Donald Trump defended his travel ban in a rambling speech to the National Sheriffs' Association on Wednesday morning.

Last week, a judge issued a stay on Trump's executive order barring refugees and citizens from seven majority-Muslim countries from entering the US. The stay suspends the order's implementation.

In his speech Wednesday, Trump said judges were trying to overturn his executive order because of politics.

"I don't ever want to call a court biased. So I won't call it biased," he told the audience. "But courts seem to be so political, and it would be so great for our justice system if they would be able to read a statement and do what's right."

The president pointed to immigration law that seems to support his travel ban.

"You could be a lawyer, or you don't have to be a lawyer," Trump said. "If you were a good student in high school or a bad student in high school, you can understand this. And it's really incredible to me that we have a court case that's going on so long."

Trump then named the specific section of US immigration law he was alluding to.

"I'm going to read what's in dispute, what's in question, and you'll see this," Trump said. "'Suspension of entry or imposition of restrictions by the president.' Now, this isn't just me — this is for Obama, for Ronald Reagan, for the president. And this was done, very importantly, for security."

The president continued: "It was done for the security of our nation, the security of our citizens, so that people come in who aren't going to do us harm. And that's why it was done. And it couldn't have been written any more precisely. It's not like, 'Oh, gee, we wish it were written better.' It was written beautifully."

Trump again recited the section of immigration law, which reads: "Whenever 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, and for such period as he shall deem necessary, 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."

As he was reading, Trump paused to imply that the law was not politically correct because its language assumes the president is a man.

"Now, the only mistake is they should have said 'he or she,'" Trump said. "But hopefully it won't be a 'she' for at least another seven years. ... I just noticed that, actually. I'm saying, whoa, this is not politically correct."

Trump said the law is clear.

"I was a good student. I comprehend things," he said. "I understand very well. Better than, I think, almost anybody. And I want to tell you. I listened to a bunch of stuff last night on television that was disgraceful. ... Because what I just read to you is what we have. And it just can't be written any plainer or better."

Trump said he thinks it's "sad" that his travel ban is being challenged.

"I think our security is at risk today, and it will be at risk until such time we are entitled and get what we are entitled to as citizens of this country," he said. "We want security. One of the reasons I was elected is because of law and order and security."

Trump seemed to hint at classified information he now has on threats to US security.

"Believe me, I have learned a lot in the last two weeks, and terrorism is a far greater threat than the people of our country understand," he said. "But we are going to take care of it. We are going to win."

Trump also addressed issues facing the members of the sheriffs' association, telling them they had a "true, true friend" in the White House. He cited the "public-safety crisis" in America's cities and said officers should have the weapons and tools they need to fight crime.