Three federal appeals judges unanimously upheld a decision that slammed the brakes on President Trump’s refugee and immigration ban — and he furiously fired back on Twitter that he would continue the fight in court.

The ruling by the 9th Circuit Court of Appeals in San Francisco means the temporary travel ban — which caused chaos and massive protests at airports across the US — cannot go into effect without further litigation.

“The Government has pointed to no evidence that an alien of the countries named in the Order has perpetrated a terrorist attack in the United States,” the three-member panel wrote.

“Rather than present evidence to explain the need for the Executive Order, the Government has taken the position that we must not review its decision at all. We disagree.”

Trump responded in an all-caps post on Twitter: “SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!”

He later told NBC the ruling was a “political decision” and predicted “we’re gonna win the case.”

The judges — who included one Republican — said the states of Washington and Minnesota had shown that even temporary reinstatement of the ban would cause harm to their citizens.

And the judges also took issue with the administration’s argument that the president had nearly absolute power over the nation’s borders and immigration policies.

Washington’s state attorney, Bob Ferguson, was exuberant.

“This is a complete victory for the state of Washington,” he declared.

Trump has insisted his travel ban wasn’t aimed at Muslims.

But the appeals judges said that issue remains to be decided.

“The States have offered evidence of numerous statements by the President about his intent to implement a ‘Muslim ban’ as well as evidence they claim suggests that the Executive Order was intended to be that ban,” the judges wrote.

“The States’ claims raise serious allegations and present significant constitutional questions,” they added, saying they would defer judgment on those claims but that the issue should be addressed.

Trump had earlier blasted the appeals judges who heard the Justice Department’s appeal of the temporary restraining order that halted the ban as “disgraceful.”

Trump wants to ban refugees from Syria indefinitely and refugees from six other countries plagued by terrorism — Iran, Iraq, Libya, Somalia, Sudan and Yemen — for 120 days. He also wants to bar immigrants and visitors to the US from those seven countries for 90 days.

The three judges who heard the government’s appeal were Democratic appointees William Canby and Michelle Friedland and GOP appointee Richard Clifton.