The U.S. Justice Department says it will appeal the latest ruling by a Hawaii federal judge that indefinitely blocked President Donald Trump's revised restrictions on travel from six mainly Muslim countries.

The Justice Department's appeal was set out in a court filing on March 30.

The appeal will be heard by the 9th U.S. Circuit Court of Appeals in San Francisco, the court that last month upheld a suspension of Trump's first travel order.

White House spokesman Sean Spicer on March 30 said the administration believes Trump’s executive order is legal and would eventually be allowed to move forward.

Trump has said the travel restrictions are necessary to keep potential terrorists out of the country.

Judge Derrick Watson on March 29 issued his ruling extending the temporary halt on Trump's travel order until a lawsuit by the state of Hawaii against the presidential directive is resolved in the courts.

The executive order is aimed at temporarily barring refugees as well as travelers from six predominantly Muslim countries from entering the United States and was due to go into effect on March 16.

The countries involved in the order are Somalia, Iran, Syria, Sudan, Libya, and Yemen.

Trump signed the revised ban on March 6 after his January executive order was struck down by a federal judge.

Hawaii challenged the order, saying it discriminates against Muslims and hurts the state's tourist economy.