The U.S. Court of Appeals for the 9th Circuit ruled Monday that President Trump's temporary travel ban should remain on hold — the final judicial blow as attorneys prepare for a likely showdown before the Supreme Court.

A three-judge panel of the 9th Circuit unanimously found that revisions made by the White House did not eliminate the underlying problems of the ban, which targets six majority-Muslim countries: that it discriminates based on religion and exceeds the president's authority. The appeals court, which also ruled against Trump's first travel ban in February, concluded that his own statements made clear that the revised version contains the same flaw by targeting Muslims.

"The president must make a sufficient finding that the entry of these classes of people would be 'detrimental to the interests of the United States,'” the panel ruled. "Further, the order runs afoul of other provisions ... that prohibit nationality-based discrimination and require the president to follow a specific process when setting the annual cap on the admission of refugees."

At issue is Trump's proposal to ban most travel from Iran, Libya, Somalia, Sudan, Syria and Yemen for 90 days and suspend the entire refugee program for 120 days. Justice Department lawyers made several adjustments from the first travel ban to address concerns raised by judges across the country. The revised version allowed current visa and green card holders to continue traveling, removed Iraq from the list of targeted countries and deleted a section that gave preference to Christian minorities in those countries.

Trump has said the travel ban is needed to give the federal government time to develop enhanced vetting procedures for people coming from terror-prone countries to ensure terrorists don't sneak into the United States through the legal immigration system. Critics have said the orders amount to an unconstitutional "Muslim ban" that Trump called for during his presidential campaign.

Trump has insisted the ban is legal and questioned his own lawyers for bowing to court rulings by issuing a "watered-down" version that was also blocked by courts. In a series of tweets last week, the president said the Justice Department should have stuck by the original travel ban and pushed for a "much tougher version." He continued a series of attacks against judges who have ruled against him, tweeting that "courts are slow and political!"

The revised ban already had been blocked by federal district court judges in Hawaii and Maryland and by the U.S. Court of Appeals for the 4th Circuit, based in Virginia. The Justice Department filed an appeal with the Supreme Court, which is expected to announce in the coming weeks whether it will hear the case.