TEHRAN (Tasnim) - President Donald Trump struck out again with his third try at a travel ban, as a federal judge temporarily blocked it from taking effect nationwide on Wednesday.

This time, Trump’s order was found to discriminate by using the nationality of travelers “as a proxy” for their security risk. In earlier rulings over two prior attempts at a travel ban, judges said they were motivated by bias against Muslims, Bloomberg reported.

The administration vowed to keep fighting, and the case could again reach the US Supreme Court, which has so far appeared more receptive than lower-court judges to Trump’s efforts to curtail immigration. The raging battle, now in its ninth month, has spurred a constitutional confrontation that could define powers of the presidency for years to come.Trump hasn’t shown that the entry of more than 150 million nationals from six specified countries would be “detrimental to the interests of the United States," US District Judge Derrick Watson in Honolulu said in issuing a temporary restraining order against the administration.

Federal immigration laws "do not afford the President unbridled discretion to do as he pleases," the judge said.

The decision arrived just hours before the executive order was to take effect. Judges in Greenbelt, Maryland, and Seattle are also reviewing the measure. The Greenbelt judge heard arguments on Monday.

The White House said in a statement the president is confident about winning the legal battle after the executive order was crafted based on an “extensive worldwide security review” in consultation with the Secretary of Homeland Security and his cabinet.

The US entry restrictions “apply to countries based on their inability or unwillingness to share critical information necessary to safely vet applications, as well as a threat assessment related to terrorism, instability, and other grave national security concerns,” according to the statement.

The Justice Department, in a separate statement, called the ruling “incorrect” and said it fails to respect the “separation of powers” between the judiciary and the executive branches.

Trump’s decree would unconditionally suspend entry to all people traveling to the US from Syria and North Korea and bar many coming from Chad, Iran, Libya, Somalia, Venezuela and Yemen.

The third iteration of the ban "plainly discriminates based on nationality," Watson said. The judge also found that the restrictions are rife with “inconsistencies” in how they block certain travelers from Venezuela and Libya, while allowing others, without explaining why.

Reaz Jafri, who leads the immigration practice at Withers Bergman LLP in New York, said the Trump administration will want to push the Supreme Court to resolve the dispute once and for all.

"One thing we’ve seen with President Trump is that he’ll go back to the drawing board and write a new executive order when one is blocked, but this is the one they believe is going to work, and a federal court has just knocked it down,” he said.

Hawaii Attorney General Doug Chin called Tuesday’s ruling “another victory for the rule of law” and said the state is “ready to defend it.”

ACLU lawyer Omar Jadwat, who represents several parties in the Hawaii case, said the allegation that Trump’s ban is inspired by anti-Muslim bias will continue to feature in the case, even if it wasn’t the basis for Tuesday’s ruling. The ban is fundamentally flawed, the attorney said.

"As long as the government tries to enact the same core policy over and over again, it should not be surprised that it ends up with the same result over and over again, which is courts finding these bans to be illegal and unconstitutional," Jadwat said in a phone call.

Earlier versions of the ban didn’t include North Korea, Venezuela or Chad, and foundered before judges who said they were aimed at people from majority-Muslim countries, partly fulfilling candidate Trump’s calls to ban all Muslims. The Supreme Court later allowed parts of Trump’s March 6 decree to take effect, while carving out exceptions for those with close relatives in the US that order expired on Sept. 24.

There have been at least six legal challenges to Trump’s latest travel ban. Hawaii Attorney General Douglas Chin revived a lawsuit opposing the initial one, while immigrant rights’ groups including the International Refugee Assistance Project and HIAS -- an organization founded in the 19th century to aid Eastern European Jews -- sought to block the second.

The states of Washington, California, New York, Massachusetts, Maryland and Oregon last week restarted their litigation in Seattle, and individuals have sued as well.

Trump’s first ban, issued Jan. 27, sought to bar those who would enter the US from seven majority Muslim countries, then including Iraq and Sudan, during a 90-day review of US vetting procedures. Announced without prior warning, it caused chaos at US airports and a torrent of lawsuits objecting to the sudden exclusion of people who had a right to be in the US.

After an appeals court blocked Trump from enforcing the ban, the president issued a revised order that dropped Iraq and provided additional reasons for halting entry from the remaining countries. That sparked additional suits, court orders and appellate reviews.

The two appeals courts that halted parts of the second ban focused on comments by Trump and his surrogates during last year’s campaign. Those statements, according to the courts in San Francisco and Richmond, Virginia, betrayed an anti-Muslim animus behind the executive orders.

The administration argued that the statements couldn’t be considered once Trump took office and that courts were bound by law to confine their analysis of his orders to the contents of the document.

The Supreme Court agreed to hear the case and in a preliminary June ruling lifted lower-court restrictions preventing part of the second order from taking effect. It had scheduled an argument for earlier this month, then scrapped that after Trump issued his third decree.

Watson was a 2013 nominee of President Barack Obama, a Democrat.

The cases are State of Hawaii v. Trump, 17-cv-00050, US District Court, District of Hawaii (Honolulu); International Refugee Assistance Project v. Trump, 17-cv-361, and Iranian Alliances Across Borders v. Trump, 17-cv-02921, US District Court, District of Maryland (Greenbelt); and State of Washington v. Trump, 17-cv-00141, US District Court, Western District of Washington (Seattle).