(CNN) President Donald Trump on Thanksgiving railed against the US 9th Circuit Court of Appeals as a "big thorn in our side" and accused the American judiciary of undermining national security.

Earlier this week, a judge from the Northern District of California -- where cases get appealed to the 9th Circuit -- issued a temporary restraining order blocking the Trump administration from barring migrants who cross into the US illegally from seeking asylum.

"We get a lot of bad court decisions from the 9th Circuit, which has become a big thorn in our side," Trump said Thursday during a teleconference call with military members. "We always lose, and then you lose again and again, and then you hopefully win at the Supreme Court, which we have done. But it's a terrible thing when judges take over your protective services, when they tell you how to protect your border."

"It's a disgrace," he continued.

He continued his criticism into early Thanksgiving evening, saying "judicial activism" prevented security officials from protecting the border.

Read More