Updated

President Trump's revised travel ban was put on hold Wednesday by a federal judge in Hawaii just hours before it was set to take effect after hearing arguments that the executive order discriminates on the basis of nationality.

Trump addressed the judge’s move during a rally in Nashville, Tennessee calling it “unprecedented judicial overreach” and vowed to fight.

"We're going to win. We're going to keep our citizens safe," Trump said. "The danger is clear. The law is clear. The need for my executive order is clear."

The ruling by U.S. District Court Judge Derrick Watson prevents the executive order from going into effect, at least for now. Hawaii had requested a temporary restraining order.

"Enforcement of these provisions in all places, including the United States, at all United States borders and ports of entry, and in the issuance of visas is prohibited, pending further orders from this Court," Watson wrote in his ruling.

CLICK HERE TO READ THE FULL RULING.

In a statement released late Wednesday night the Department of Justice said they strongly disagreed with the ruling and called the move "flawed both in reasoning and scope."

"The President’s Executive Order falls squarely within his lawful authority in seeking to protect our Nation’s security, and the Department will continue to defend this Executive Order in the courts," said DOJ Spokesperson Sarah Isgur Flores.

The ruling came as opponents renewed their legal challenges across the country, asking judges in three states to block the executive order that targets people from six predominantly Muslim countries.

More than half a dozen states are trying to stop the ban, and federal courts in Maryland, Washington state and Hawaii heard arguments about whether it should be put into practice early Thursday.

Hawaii also argued to the court that the ban would prevent residents from receiving visits from relatives in the six countries covered by the order. The state says the ban would harm its tourism industry and the ability to recruit foreign students and workers.

Senator Mazie K. Hirono, D-Hawaii, welcomed the ruling and said “Judge Watson exemplifies the importance of an independent judiciary.”

Hawaii Rep. Tulsi Gabbard called the travel ban "bad policy" and praised Attorney General Doug Chin for stopping the order.

In Maryland, attorneys told a federal judge that the measure still discriminates against Muslims.

More on this...

Government attorneys argued that the ban was revised substantially to address legal concerns, including the removal of an exemption for religious minorities from the affected countries.

"It doesn't say anything about religion. It doesn't draw any religious distinctions," Jeffrey Wall, who argued for the Justice Department, said in court.

Attorneys for the ACLU and other groups said that Trump's statements on the campaign trail and statements from his advisers since he took office make clear that the intent of the ban is to ban Muslims.

New York Attorney General Eric Schneiderman called the order "yet another victory."

"President Trump's second executive order is just a Muslim Ban by another name - with the same unlawful and unconstitutional goal of discriminating based on religion and national origin," he said in a statement.

Trump policy adviser Stephen Miller has previously said the revised order was designed to have "the same basic policy outcome" as the first.

The latest version of the ban details more of a national security rationale. It is narrower and eases some concerns about violating the due-process rights of travelers, appyling only to new visas from Somalia, Iran, Syria, Sudan, Libya and Yemen and temporarily shuts down the U.S. refugee program. It does not apply to travelers who already have visas.

"Generally, courts defer on national security to the government," said U.S. District Judge Theodore Chuang. "Do I need to conclude that the national security purpose is a sham and false?"

In response, ACLU attorney Omar Jadwat pointed to Miller's statement and said the government had put out misleading and contradictory information about whether banning travel from six specific countries would make the nation safer.

The Maryland lawsuit also argues that it's against federal law for the Trump administration to reduce the number of refugees allowed into the United States this year by more than half, from 110,000 to 50,000. Attorneys argued that if that aspect of the ban takes effect, 60,000 people would be stranded in war-torn countries with nowhere else to go.

In the Hawaii case, the federal government said there was no need to issue an emergency restraining order because Hawaii officials offered only "generalized allegations" of harm.

Jeffrey Wall of the Office of the Solicitor General challenged Hawaii's claim that the order violates due-process rights of Ismail Elshikh as a U.S. citizen who wants his mother-in-law to visit his family from Syria. He says courts have not extended due-process rights outside of a spousal relationship.

Neal Katyal, a Washington, D.C., attorney representing Hawaii, called the story of Elshiskh, an Egyptian immigrant and naturalized U.S. citizen, "the story of America."

Wall told the judge that if he is inclined to issue an injunction, it should be tailored specifically to Hawaii and not nationwide.

In Washington state, U.S. District Judge James Robart -- who halted the original ban last month -- heard arguments in a lawsuit brought by the Northwest Immigrant Rights Project, which is making arguments similar to the ACLU's in the Maryland case.

Robart said he is most interested in two questions presented by the group's challenge to the ban: whether the ban violates federal immigration law, and whether the affected immigrants would be "irreparably harmed" should the ban go into effect.

He spent much of Wednesday afternoon's hearing grilling the lawyers about two seeming conflicting federal laws on immigration -- one which gives the president the authority to keep "any class of aliens" out of the country, and another that forbids the government from discriminating on the basis of nationality when it comes to issuing immigrant visas.

Robart said he would issue a written order, but he did not say when. He is also overseeing the challenge brought by Washington state.

Attorney General Bob Ferguson argues that the new order harms residents, universities and businesses, especially tech companies such as Washington state-based Microsoft and Amazon, which rely on foreign workers. California, Maryland, Massachusetts, New York and Oregon have joined the claim.

Washington and Hawaii say the order also violates the First Amendment, which bars the government from favoring or disfavoring any religion. On that point, they say, the new ban is no different than the old. The states' First Amendment claim has not been resolved.

The 9th U.S. Circuit Court of Appeals refused to reinstate the original ban but did not rule on the discrimination claim.

The Associated Press contributed to this report.