SEATTLE -- Another U.S. appeals court stomped on U.S. President Donald Trump's revised travel ban Monday, saying the administration violated federal immigration law and failed to provide a valid reason for keeping people from six mostly Muslim nations from coming to the country.

The decision by a unanimous three-judge panel of the San Francisco-based 9th U.S. Circuit Court of Appeals helps keep the travel ban blocked and deals Trump a second big legal defeat on the policy in less than three weeks.

The administration said it would seek further review at the U.S. Supreme Court, as it has already done with a ruling against the travel ban by another appeals court last month. The high court is likely to consider the cases in tandem.

Attorney General Jeff Sessions insisted the new decision would harm national security -- an argument the judges rejected.

"The executive branch is entrusted with the responsibility to keep the country safe under Article II of the Constitution," Sessions said in a written statement. "Unfortunately, this injunction prevents the president from fully carrying out his Article II duties and has a chilling effect on security operations overall."

Hawaii Attorney General Doug Chin, who sued to stop the travel ban, said the 9th Circuit ruling "really shows that we have three branches of government and that there are checks and balances. ... So to me, this is everything that we learned in social studies in high school just coming to play exactly the way it should."

The 4th U.S. Circuit Court of Appeals in Virginia last month found the 90-day ban unconstitutional, saying it was "steeped in animus and directed at a single religious group" rather than necessary for national security. It cited the president's campaign statements calling for a "total and complete shutdown" on Muslims entering the U.S.

The 9th Circuit, which heard arguments in Seattle last month in Hawaii's challenge to the ban, found no need to analyze those statements. It ruled based on immigration law, not the Constitution.

"Immigration, even for the president, is not a one-person show," the judges said, adding: "National security is not a 'talismanic incantation' that, once invoked, can support any and all exercise of executive power."

Judges Michael Hawkins, Ronald Gould and Richard Paez -- all appointed by President Bill Clinton -- said the travel ban violated immigration law by discriminating against people based on their nationality when it comes to issuing visas and by failing to demonstrate that their entry would hurt American interests.

The president's order did not tie citizens of Iran, Libya, Somalia, Sudan, Syria and Yemen to terrorist organizations or identify them as contributors to "active conflict," the court said. It also did not provide any link between their nationality and their propensity to commit terrorism.

"In short, the order does not provide a rationale explaining why permitting entry of nationals from the six designated countries under current protocols would be detrimental to the interests of the United States," the ruling said.

The judges pointed to a June 5 tweet by Trump saying the order was aimed at "dangerous countries." That helped show he was not assessing whether the six countries had ties to terrorism, they said.

The White House predicted a win at the Supreme Court.

"Frankly, I think any lawyer worth their salt 100 per cent agrees that the president's fully within his rights and his responsibilities to do what is necessary to protect the country," spokesman Sean Spicer said.

Trump's suspension of the U.S. refugee program also remains blocked. The 9th Circuit said he was required to consult with Congress in setting the number of refugees allowed into the country in a given year and that he could not decrease it midyear. The refugee program is not at issue in the 4th Circuit case.

The president issued the executive order after the initial version caused chaos and protests at airports and was blocked by a Seattle judge and a different three-judge 9th Circuit panel. The new version was designed to better withstand legal scrutiny and spelled out more of a national security rationale.

Several states and civil rights groups challenged the revised ban, saying it remained rooted in discrimination and exceeded the president's authority.

U.S. District Judge Derrick Watson in Hawaii blocked the new version in March, citing what he called "significant and unrebutted evidence of religious animus" in Trump's campaign statements.

The 9th Circuit narrowed Watson's ruling in some minor ways, allowing the administration to conduct an internal review of its vetting procedures for refugees and visa applicants.

------

Thanawala reported from San Francisco. Associated Press writers Mark Sherman in Washington, D.C. and Jennifer Sinco Kelleher in Honolulu contributed to this report.

This story has been corrected to show Trump tweeted June 5, not June 6.