WASHINGTON - White House Press Secretary Sean Spicer has confirmed that the Trump administration plans to appeal rulings from two federal judges blocking the president’s revised travel ban on people from six Muslim majority countries.

During Thursday’s daily briefing with White House reporters, Spicer called the rulings “flawed” and confirmed that the White House plans to appeal. President Trump has vowed to take the matter to the Supreme Court, if necessary.

Trump Administration Vows to Appeal 'Flawed' Rulings on Travel Ban

The ban was supposed to go into effect at 12:01 a.m. Eastern time (0401 UTC) Thursday.

Trump Administration Vows to Appeal 'Flawed' Rulings on Travel Ban

Sorry, but your browser cannot support embedded video of this type, you can to view it offline.

Trump Administration Vows to Appeal 'Flawed' Rulings on Travel Ban

But instead, two U.S. federal courts issued temporary restraining orders against the president’s second attempt at a travel order that would limit who can enter the country.

A judge in Hawaii blocked both the order's suspension of refugee admissions and its ban on issuing new visas to people from a group of six countries. A federal judge in Maryland also cited Trump's comments in issuing a separate injunction Thursday, but that ruling applies only to the visa ban portion of the executive order, and not the section on the refugee program.

Judge Derrick Watson found Wednesday that the legal challenge brought by the state of Hawaii was likely to succeed on the merits of an argument that the executive order violates the Constitution's Establishment Clause, which requires government actions to have a primarily secular purpose.

He pointed to statements made by Trump and his associates both before and after the president was elected in November. Trump's campaign once included a call to ban all Muslims from entering the United States, a policy that was later changed to advocating "extreme vetting" for people from countries with a link to terrorism.

Judge Watson said the case before him included "significant and unrebutted evidence of religious animus driving the promulgation of the executive order and its related predecessor."

Sorry, but your browser cannot support embedded video of this type, you can to view it offline.

The Trump administration says the ban is necessary to protect the country from the threat of terrorism.It features a four-month ban on admitting any refugees and a three-month freeze on issuing visas to people from Iran, Syria, Yemen, Libya, Somalia and Sudan.It was due to go into effect Thursday before its enforcement was frozen.

An earlier version of the order included Iraq in the targeted countries, as well as a clause that exempted religious minorities from the ban.

All of the countries involved are overwhelmingly majority-Muslim.Judge Watson rejected the government's argument that because the listed countries do not include all the world's Muslim population, the order is not a ban on Muslims.

"The notion that one can demonstrate animus toward any group of people only by targeting all of them at once is fundamentally flawed.The court declines to relegate its Establishment Clause analysis to a purely mathematical exercise," Watson wrote.

The Justice Department, which represents the government in the case, said it does not agree with Wednesday's ruling, calling it "flawed both in reasoning and in 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 a DOJ statement.

Trump said the court's ruling makes the United States look weak, and that he will continue the legal battle.

"The danger is clear, the law is clear, the need for my executive order is clear," he told supporters at a rally in Tennessee."I was elected to change our broken and dangerous system and thinking in government that has weakened and endangered our country and left our people defenseless."

Leon Fresco, an immigration attorney who served as deputy assistant attorney general for the DOJ Civil Division's Office of Immigration Litigation during President Barack Obama's administration, said the key question in the case going forward is the president's authority to suspend entry of people he finds would be detrimental to the country.

"I think it was an interesting ruling in the sense that the court is taking a very bold statement on saying that the actions in the administration have basically irrevocably tainted any effort to move forward with this travel executive order," Fresco told VOA via Skype.