US President Donald Trump (C), House Speaker Paul Ryan (R-WI) (L) and Vice President Mike Pence walk down the House east front steps after the annual Friends of Ireland luncheon at the Capitol March 16, 2017 in Washington, DC. (Photo by AFP)

The White House says it will appeal against the rulings of two federal judges who blocked President Donald Trump’s revised travel ban on citizens of six Muslim-majority nations.

Spokesman Sean Spicer said on Thursday the Trump administration would “vigorously defend” its ban, after the US president vowed to challenge what he described as “terrible” decision to suspend it.

“We intend to appeal the flawed rulings,” Spicer said.

Two federal judges in Hawaii and Maryland froze Trump’s efforts to close US borders to nationals of Iran, Libya, Somalia, Sudan, Syria and Yemen.

Although the ban was already restrained nationwide by District Judge Derrick Watson of Hawaii on Wednesday evening, the Maryland decision early on Thursday was another blow to Trump’s executive order.

District Judge Theodore D. Chuang of Maryland said Trump’s revised travel order was still meant to discriminate against Muslims.

“The history of public statements continues to provide a convincing case that the purpose of the Second Executive Order remains the realization of the long-envisioned Muslim ban,” he wrote.

The Maryland judge said the ban will cause “irreparable harm” if it goes into effect.

Hours earlier, the Hawaii judge ruled that the court had established that the law could not be enforced.

It was another setback for President Trump, who saw his first attempt halted by the federal courts last month.

People protest against the travel ban imposed by US President Donald Trump in Berlin, near the Brandenburg Gate and the US embassy, February 4, 2017. (Photo by AFP)

The judges questioned the Trump administration’s use of the September 11, 2001 terror attacks on the US as a justification for the travel ban and said such measures must be “based in fact, as opposed to fiction.”

Trump’s new order maintained a 90-day ban on travel to the US by citizens of Iran, Syria, Libya, Yemen, Somalia and Sudan, but excluded Iraq and applied the restriction only to new visa applicants. It also removed an indefinite ban on Syrian refugees.