 -- A panel of federal appeals court judges ruled Thursday evening to keep a restraining order against Donald Trump's controversial immigration action in place, foiling the administration's attempt to get the action reinstated, according to court documents.

The move capped a public campaign by the president to put pressure on the courts to rule in his favor, calling the decision "easy" and suggesting that the judge who made the original ruling could be to blame if a terrorist attack happens.

Tonight, Trump lashed out against ruling from the 9th Circuit Court of Appeals in an all-caps tweet.

In its unanimous decision, the three-judge panel denied the Department of Justice's bid for an emergency stay, saying that the president's previous remarks about a Muslim ban potentially could be used as evidence, saying rights attached to non-citizens and saying the government did not present evidence that nationals from the affected countries perpetrated attacks in the U.S.

“We hold that the Government has not shown a likelihood of success on the merits of its appeal, nor has it shown that failure to enter a stay would cause irreparable injury, and we therefore deny its emergency motion for a stay,” the panel, from the 9th Circuit Court of Appeals, wrote in the decision Thursday.

The DOJ said in a statement it is reviewing the decision.

Last week, a Washington federal district court judge, James Robart, issued a temporary restraining order that blocked Trump's executive action nationwide, saying the policy would cause "immediate and irreparable injury" and taking issue with potential religious discrimination as a result of certain provisions that could prioritize some groups over others.

The appeals panel heard arguments from a lawyer representing the state of Washington Tuesday who argued that the executive order -- which temporarily halted immigration from seven predominantly Muslim countries in the Middle East and Africa and temporarily shut down the refugee program -- discriminated on the basis of religion among other claims.

Department of Justice lawyers claimed that the order was made on national security grounds and that Washington District Court Judge James Robart’s issuance of a temporary restraining order pausing the ban nationwide was “overbroad.”

In Tuesday's hearing, which was conducted by phone, states alleged that the teaching and research missions of their universities are harmed by the executive order's effect on faculty and students who are nationals of the seven affected countries.

In its ruling, the appeals court took issue with the government's claim that the courts couldn't review the president's authority to suspend "admission of any class of aliens."

"There is no precedent to support this claimed unreviewability, which runs contrary to the fundamental structure of our constitutional democracy," the judges wrote.

"Although our jurisprudence has long counseled deference to the political branches on matters of immigration and national security, neither the Supreme Court nor our court has ever held that courts lack the authority to review executive action in those arenas for compliance with the Constitution."

The states also argued that the order effectively constituted a Muslim ban and offered multiple statements made by Trump during the presidential election that said he intended to implement such a ban.

The judges agreed that Trump’s talk of a “Muslim ban” could potentially be used as evidence for discrimination as the case proceeds, a point which the government argued against.

“It is well established that evidence of purpose beyond the face of the challenged law may be considered in evaluating Establishment and Equal Protection Clause claims,” the judges said.

But the appellate judges said “we reserve consideration of these claims until the merits of this appeal have been fully briefed.”

And the appeals panel also rejected the government's argument that the restraining order was overly broad in applying to those who have never had contacts with the U.S.

"The procedural protections provided by the Fifth Amendment’s Due Process Clause are not limited to citizens," the judges wrote.

Finally, the judges said that the government did not present evidence that there were terrorist attacks perpetrated in the U.S. by nationals of the countries affected by the ban.

"The Government has pointed to no evidence that any alien from any of the countries named in the Order has perpetrated a terrorist attack in the United States," the judges wrote. "Rather than present evidence to explain the need for the Executive Order, the Government has taken the position that we must not review its decision at all."

Trump unleashed a series of attacks on Robart following the judge’s initial decision to interrupt his order last week. On Twitter, the president called Robart a “so-called judge,” said his decision was “ridiculous and will be overturned,” and added that “[i]f something happens blame him and court system.”

Those comments were later condemned by members of both major political parties. Trump's Supreme Court nominee Judge Neil Gorsuch classified Trump's criticisms of the judiciary as “demoralizing” and “disheartening” in conversations on Capitol Hill, according to a spokesman, but the White House insisted he was not referring to a specific case.

The administration has denied that the order is a Muslim ban.