A federal judge in Maryland rejected the prohibition against six predominantly Muslim countries.

GREENBELT, Md. President Donald Trump's revised travel ban was dealt another legal setback Thursday when a federal judge in Maryland rejected the prohibition against six predominantly Muslim countries.

The ruling near the nation's capital was the latest blow to Trump's ban, with a federal judge in Hawaii rejecting the measure on Wednesday. Both judges cited Trump's own words as evidence of his intent in issuing the new plan.

U.S. Judge Theodore Chuang ruled Thursday in Greenbelt, Maryland, in a case brought by the American Civil Liberities Union and other groups representing immigrants, refugees and their families. The groups argued that the underlying rationale of the ban was to discriminate against Muslims, making it unconstitutional.

Chuang, who was appointed by then-President Barack Obama, called Trump's own statements about intentions to impose a Muslim ban "highly relevant." Trump's second executive order does include changes from the first order, Chuang noted, such as the removal of a preference for religious minorities in the refugee process.

"Despite these changes, the history of public statements continues to provide a convincing case that the purpose of the Second Executive Order remains the realization of the long-envisioned Muslim ban," he said.

On Wednesday, U.S. District Judge Derrick Watson in Honolulu criticized what he called the "illogic" of the government's arguments and cited "significant and unrebutted evidence of religious animus" behind the travel ban. He also noted that while courts should not examine the "veiled psyche" and "secret motives" of government decision-makers, "the remarkable facts at issue here require no such impermissible inquiry."

Watson also wrote, referring to a statement Trump issued as a candidate, "For instance, there is nothing 'veiled' about this press release: 'Donald J. Trump is calling for a total and complete shutdown of Muslims entering the United States.'"

Chuang granted a preliminary injunction on a nationwide basis. He declined to issue an injunction blocking the entire executive order, saying that the plaintiffs didn't sufficiently develop their argument that the temporary ban on refugees offends the establishment clause and didn't provide sufficient basis to establish the invalidity of the rest of the order.

Details of the implementation of the orders also indicate that national security isn't the primary purpose of the ban, Chuang said.

"The fact that the White House took the highly irregular step of first introducing the travel ban without receiving the input and judgment of the relevant national security agencies strongly suggests that the religious purpose was primary and the national security purpose, even if legitimate, is a secondary, post hoc rationale," he said.

"The Maryland court saw through the government's legal maneuvering and recognized the new order for what it was: a Muslim ban," said Lee Gelernt, deputy director of the ACLU's national Immigrants' Rights Project and one of the attorneys on the case. "And importantly, he issued a preliminary injunction, not just a (temporary restraining order), so the injunction will remain in place through trial, and not just for a couple of weeks."

Trump called the ruling in Hawaii an example of "unprecedented judicial overreach" and said his administration would appeal it to the U.S. Supreme Court. He also called his new travel ban a watered-down version of the first one, which he said he wished he could implement.

"We're going to win. We're going to keep our citizens safe," the president said at a rally in Nashville, Tennessee, on Wednesday. "The danger is clear. The law is clear. The need for my executive order is clear."