Updated at 5:40 p.m. ET

The 4th U.S. Circuit Court of Appeals has ruled that President Trump's controversial travel ban should be kept on hold, maintaining a nationwide preliminary injunction that blocks key elements of the executive order from being enforced.

A 13-judge panel of the court heard arguments over the ban earlier this month. In Thursday's decision, the chief judge writes that the travel ban "drips with religious intolerance, animus, and discrimination."

Trump has signed two executive orders restricting travelers from a handful of majority-Muslim countries and putting a temporary moratorium on refugees. The first prompted chaos and was swiftly challenged in court. It was replaced by a second order, which omitted references to religion and explicitly exempted green card holders. That one, too, was promptly challenged in court and its central provisions have never gone into effect.

The second executive order — "EO-2," as the court dubbed it — is the one that was under consideration by the 4th Circuit as well as several other courtrooms across the country.

The issue at hand: whether a lower court acted properly in issuing a nationwide injunction to keep the order from being enforced. That means the court was not directly ruling on the travel ban's constitutionality. But to rule on the injunction, the judges had to evaluate the strength of the case against the ban.

They decided the arguments against the executive order were strong indeed.

The judges ruled 10-3 on Thursday to "affirm in substantial part" the earlier decisions that have kept the controversial ban from going into effect.

In their decision, they drew on the "backdrop of public statements by the President and his advisers and representatives" to conclude that lawyers have a good chance of proving in court that Trump was motivated by religious animus when he signed the order.

The judges "remain unconvinced" that the travel ban had "more to do with national security than it does with effectuating the President's promised Muslim ban."

"We find that the reasonable observer would likely conclude that EO-2's primary purpose is to exclude persons from the United States on the basis of their religious beliefs," Chief Judge Roger Gregory wrote on behalf of the majority.

"Surely the Establishment Clause of the First Amendment yet stands as an untiring sentinel for the protection of one of our most cherished founding principles — that government shall not establish any religious orthodoxy, or favor or disfavor one religion over another," the ruling read. While the president has broad power over immigration, "that power is not absolute. It cannot go unchecked," the court said.

And claims of national security are not a "silver bullet" to defeat any arguments against a decision, the judges ruled.

Thursday afternoon, Attorney General Jeff Sessions issued a response to the ruling, saying the executive order was "well within [the president's] lawful authority "to keep the Nation safe":

"The Department of Justice strongly disagrees with the decision of the divided court, which blocks the President's efforts to strengthen this country's national security. As the dissenting judges explained, the executive order is a constitutional exercise of the President's duty to protect our communities from terrorism. The President is not required to admit people from countries that sponsor or shelter terrorism, until he determines that they can be properly vetted and do not pose a security risk to the United States."

Sessions also said his department would ask the Supreme Court to review the ruling.

The judges did overturn one small part of the injunction — namely, the bit where it specifically applied to one Donald Trump. The injunction covered the entire administration, but also Trump as an individual, which the judges say was inappropriate. So now he is no longer singled out — which, the court says, should not affect the enforcement of the injunction.

Three judges dissented, saying they would vacate the injunction.

As NPR's Carrie Johnson has reported, judges in the 4th Circuit had focused on Trump's own words about a "Muslim ban" as they heard arguments over the case earlier this month.

"Judges on the court ... returned over and over to remarks made by Trump during the campaign," she wrote after that hearing. "Judges also noted the presence on the Trump campaign website of the 'Muslim ban' promise, which was only taken down Monday afternoon after it was brought up in the daily White House briefing."

Copyright 2017 NPR. To see more, visit http://www.npr.org/.