Donald Trump Getty Images The 4th US Circuit Court of Appeals on Thursday largely upheld a nationwide block on President Donald Trump's travel ban, arguing that it "drips with religious intolerance, animus, and discrimination."

Just hours after the ruling, the Department of Justice announced it would seek a review of the case in the Supreme Court.

"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," Attorney General Jeff Sessions said in a statement.

"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."

The travel ban, signed March 6, was Trump's second stab at an executive order halting travel from certain majority-Muslim countries.

In the majority opinion released Thursday afternoon, the 4th Circuit's chief judge, Roger Gregory, wrote that although the president is granted broad power by Congress to deny entry to foreign visitors, "that power is not absolute."

"It cannot go unchecked when, as here, the president wields it through an executive edict that stands to cause irreparable harm to individuals across this nation," Gregory wrote.

The judges said they were "unconvinced" that the underlying purpose of the travel ban was to maintain national security and that it was instead done to implement Trump's promise during his presidential campaign to bar Muslims from entering the US.

The ruling comes after a federal judge in Maryland issued an injunction in March also arguing that Trump's order was a fulfillment of his pledge.

The Trump administration's attorneys had argued before the Virginia-based 4th Circuit that comments Trump made while he was campaigning should not be considered when weighing his executive order.

"This is not a Muslim ban. Its text doesn't have anything to do with religion," Jeffrey Wall, the acting solicitor general, told the court earlier this month. "Its operation doesn't have anything to do with religion."

In its response to Thursday's ruling, the White House said it was confident Trump's order will be ultimately upheld by the courts.

"These clearly are very dangerous times and we need every available tool at our disposal to prevent terrorists from entering the United States and committing acts of bloodshed and violence," Michael Short, senior assistant press secretary, said in a statement.

On January 27, Trump signed his original executive order, which barred people from Iraq, Iran, Syria, Yemen, Libya, Sudan, and Somalia and all Syrian refugees. The order triggered mass chaos and protests at airports across the country, as even visa holders and permanent residents were detained and denied entry by customs officials.

When courts blocked that order, Trump issued a revised one in March that removed Iraq from the list of countries, allowed some exceptions for the entry of visitors from the remaining majority-Muslim countries, and removed the shutdown on the admission of Syrian refugees.