In lengthy and fiery comments to reporters outside the White House on Tuesday, President Trump excoriated the liberal-leaning Ninth Circuit Court of Appeals as a "disgrace" hours after an Obama-appointed federal judge there issued a nationwide injunction against his newly announced emergency restrictions on asylum claims.

The president vowed immediate action and said he was "going to put in a major complaint" about the appellate court, based in San Francisco, without elaborating.

He also broadly criticized the increasingly common practice of individual federal judges bringing unilateral halts to executive branch policy, which has already happened more than two dozen times under the Trump administration. The president specifically cited the Ninth Circuit's injunction against his ban on travel from several Muslim-majority nations, which was ultimately ruled a constitutional exercise of presidential authority this year by the Supreme Court.

"You go to Ninth Circuit and it's a disgrace, and I'm going to put in a major complaint. Because you cannot win, if you're us, a case in the Ninth Circuit," Trump said. "Every case gets filed in the Ninth Circuit. ... We get beaten, and then we end up having to go to the Supreme Court -- like the travel ban -- and we won. We're gonna have to look at that."

He added: "That's not law. That's not what this country stands for."

When pardoning the National Thanksgiving Turkey earlier in the day, Trump joked, "Unfortunately, I cannot guarantee your pardon will not be enjoined by the Ninth Circuit. Always happens."

U.S. District Judge Jon S. Tigar, who was nominated by President Obama in 2012 to the U.S. District Court for the Northern District of California, issued a temporary restraining order late Monday against Trump's plan to refuse asylum to immigrants who cross the southern border illegally if they do not arrive at a port of entry.

TRUMP SNUBS HARRIS, FEINSTEIN AND APPOINTS SEVERAL REPUBLICAN JUDGES TO NINTH CIRCUIT COURT OF APPEALS

"Whatever the scope of the President's authority, he may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden," Tigar wrote.

Trump took aim at Tigar in his comments on Tuesday and predicted he would win an appeal in the case at the Supreme Court, where conservatives command a narrow majority. Republicans have argued that presidents have plenary authority over immigration, and can close the southern border with Mexico for national security reasons if they wanted.

"You cannot win, if you're us, a case in the Ninth Circuit." — President Trump

"This was an Obama judge, and I'll tell you what, it's not going to happen like this anymore," Trump said. "Everybody that wants to sue the U.S. -- almost -- they file their case in the Ninth Circuit, and it means an automatic loss. No matter what you do, no matter how good your case is. And the Ninth Circuit is really something we have to take a look at, because it's not fair."

He added: "People should not be allowed to immediately run to this very friendly circuit and file their case. It's a disgrace, in my opinion, what happens with the Ninth Circuit. We will win that case in the Supreme Court of the United States."

During his confirmation hearings earlier this year, Associate Supreme Court Justice Brett Kavanaugh was asked by Louisiana Republican Sen. John Kennedy about the constitutionality of individual federal judges issuing nationwide injunctions against presidential action -- a phenomenon that has attracted scrutiny after district court judges unilaterally brought temporary halts to Trump's travel ban and other initiatives. Kavanaugh demurred, saying he could not discuss potential pending issues before the Supreme Court. (Justice Clarence Thomas had suggested taking action against the injunctions in a dissent this year.)

Separately, former Attorney General Jeff Sessions said in October that the 28 nationwide federal injunctions issued by individual judges during the Trump administration so far constitute an unprecedented "judicial encroachment."

WATCH: MIGRANT CARAVAN CLASHES WITH RESIDENTS OF TIJUANA

"It is emphatically not the duty of the courts to manage the government or to pass judgment on every policy action the Executive branch takes," Sessions said. "In the first 175 years of this Republic, not a single judge issued one of these orders."

Trump's new asylum policy was designed to prevent many members of the Central American migrant caravans -- many of whom have arrived at the U.S. border and clashed with locals in Mexican border towns -- from illegally flooding into the U.S., and was intended to instead direct them to legal crossings for expedited and orderly asylum reviews.

A joint statement by Homeland Security and the Justice Department said the Supreme Court had already shown the president had the legal right to restrict asylum.

"Our asylum system is broken, and it is being abused by tens of thousands of meritless claims every year," the departments said. "We look forward to continuing to defend the Executive Branch's legitimate and well-reasoned exercise of its authority to address the crisis at our southern border."

Homeland Security Secretary Kirstjen Nielsen, speaking Tuesday at the border, vowed to appeal the Ninth Circuit's ruling immediately. "Let me be clear: this court from a chamber in San Francisco has replaced the president’s judgment with regard to the fully delegated authority to determine what is a true national security threat to our nation’s sovereignty," Nielsen said, arguing that the ruling will "unequivocally make the United States less secure."

"We will follow all laws and judicial rulings, but we will also be appealing it as quickly as possible," she added. "I have no doubt we will be successful."

Nielsen added that DHS has confirmed that there are at least 500 criminals and known gang members in the caravan, and that "most of the caravan members" plan to make "frivolous" claims of asylum in the hopes of disappearing while their claims are pending.

"Wanting a job is not a basis for asylum under U.S. law," Nielsen said. "Wanting to be united with your family is not a basis for asylum under U.S. law."

WATCH: TUCKER CARLSON DISCUSSES WHY MIGRANT CARAVAN IS RECEIVING A HOSTILE RECEPTION IN TIJUANA

The legal standard for obtaining asylum in the U.S. is strict, and ordinarily requires that people from foreign countries demonstrate they face serious, legitimate risks of persecution by their government if they remain in their homeland.

Not all forms of persecution are relevant for asylum consideration. Under federal law, applicants must demonstrate that their risk for persecution is based on their national origin, race, religion, political views or membership in a particularly vulnerable social class -- a category that was expanded in 2014, when the Board of Immigration Appeals ruled that domestic abuse could form the basis for an asylum claim. The Trump administration reversed that expansion this year.

Around 3,000 people from the first of the caravans have arrived in Tijuana, Mexico, across the border from San Diego, California. U.S. Customs and Border Protection said Monday that it closed off northbound traffic for several hours at the San Ysidro crossing to install movable, wire-topped barriers after reports that some migrants were planning to rush through the lanes.

As of Monday, the Department of Homeland Security said it had referred 107 people to U.S. Citizenship and Immigration Services — people who had sought asylum between official crossings since Trump's order went into effect. Officials didn't say whether those people's cases were still progressing through other, more difficult avenues left to them after the proclamation.

MIGRANT CARAVAN JUST OUTSIDE U.S. IS HARBORING AT LEAST 500 CRIMINALS, DHS SAYS, AS CARAVAN CLASHES WITH MEXICAN LOCALS

More than 500 criminals are traveling with the migrant caravan that’s massed on the other side of a San Diego border crossing, homeland security officials said Monday afternoon.

The asylum clause of the Immigration and Nationality Act says that anyone who arrives to the U.S. may apply for asylum based on a well-founded fear of persecution, regardless of where they arrive. Tigar said Trump's policy flatly contradicted that law passed by Congress.

But the Executive Branch has considerable authority in determining the scope of potential asylum claims. Earlier this year, Sessions used his authority as head of asylum courts to rule that domestic violence and gang-related attacks no longer necessarily can form the basis of an asylum claim.

TRUMP DOJ SHARPLY LIMITS ASYLUM CLAIMS, SAYING SYSTEM IS OVERWHELMED WITH FRAUD

Declaring that his decision "restores sound principles of asylum and long-standing principles of immigration law," Sessions indicated that the move would help reduce the backlog of asylum claims that has risen sharply in recent years -- with many of the claims illegitimate.

"The vast majority of the current asylum claims are not valid," Sessions said in remarks this summer. "For the last five years, only 20 percent of claims have been found to be meritorious after a hearing before an immigration judge."

Sessions added that the system is simply overwhelmed with claims, and that bogus applications are crowding out legitimate ones.

Fox News' Edmund DeMarche and The Associated Press contributed to this report.