Updated

A federal judge in Hawaii has blocked President Trump’s revised travel ban – just hours before it was expected to go into effect across the United States.

Tuesday’s decision from U.S. District Judge Derrick Watson in Honolulu stops the administration’s third attempt to indefinitely ban entry into the country by most nationals of Libya, Syria, Iran, Yemen, Somalia, Chad and North Korea. The ban would also prevent some Venezuelan government officials and their families.

"Today’s dangerously flawed district court order undercuts the President’s efforts to keep the American people safe and enforce minimum security standards for entry into the United States," the White House said in a statement. "The Department of Justice will vigorously defend the President’s lawful action."

Watson, who was appointed by former President Barack Obama, found Trump's executive order "suffers from precisely the same maladies as its predecessor."

The judge said the new restrictions ignore a federal appeals court ruling that found Trump's previous ban exceeds the scope of his authority. The latest version "plainly discriminates based on nationality in the manner that the 9th Circuit has found antithetical to ... the founding principles of this nation," Watson wrote.

The government has said the new policy was based on an objective assessment of each country's security situation and willingness to share information with the U.S.

Derrick Watson

This December 2015 photo shows U.S. District Judge Derrick Watson in Honolulu. Hours before it was to take effect, President Donald Trump's revised travel ban was put on hold Wednesday, March 15, 2017, by Watson, a federal judge in Hawaii who questioned whether the administration was motivated by national security concerns. (George Lee/The Star-Advertiser via AP) (AP)

Hawaii argued in court documents that the updated ban is a continuation of Trump's "promise to exclude Muslims from the United States" despite the addition of two non-majority Muslim countries.

Other courts are weighing challenges to the latest travel restrictions.

In Maryland, the American Civil Liberties Union and other groups are seeking to block the visa and entry restrictions in the president's latest proclamation.

Washington state, Massachusetts, California, Oregon, New York and Maryland have challenged the policy before U.S. District Judge James Robart in Seattle, who struck down Trump's initial ban in January.

That policy led to chaos and confusion at airports nationwide and triggered several lawsuits, including one from Hawaii.

When Trump revised the ban, state Attorney General Doug Chin changed the lawsuit to challenge that version. In March, Watson agreed with Hawaii that it amounted to discrimination based on nationality and religion.

A subsequent U.S. Supreme Court ruling allowed the administration to partially reinstate that 90-day ban on visitors from Iran, Libya, Somalia, Sudan, Syria and Yemen and a 120-day ban on all refugees.

But it said the policy didn't apply to refugees and travelers with a "bona fide relationship" with a person or entity in the U.S.

Hawaii then successfully challenged the federal government's definition of which family members would be allowed into the country. Watson ordered the government not to enforce the ban on close relatives such as grandparents, grandchildren, uncles and aunts.

The judge's order Tuesday prevents acting Homeland Security Secretary Elaine Duke and Secretary of State Rex Tillerson from implementing the latest travel ban.

Watson said he would set an expedited hearing to determine whether the temporary restraining order should be extended.

The Associated Press contributed to this report.