President Trump lashed out at a federal judge on Twitter Saturday morning for ruling against his controversial executive order banning entry to the United States from seven Muslim-majority countries.

Federal Judge James Robart, appointed by former President George W. Bush, issued a temporary block on enforcement of Trump's ban, a move that has been applauded by civil liberties groups but earned the ire of the commander-in-chief.

"The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned!," Trump wrote on Twitter Saturday morning.

Even before Trump's comments, the White House said it would try to get a court to reinstate the ban that prompted the State Department to cancel visas for 60,000 or more people from the affected countries, causing widespread confusion at airports when some travelers were detained and others sent back.

Despite Trump's comments, the government moved quickly to comply with the judge's order. The State Department reversed visa cancellations for foreigners, and the Homeland Security Department said it's no longer directing airlines to prevent affected visa-holders from boarding U.S.-bound flights.

Trump also once again referred to his executive order as a ban, putting him at odds with his own press secretary, Scott Spicer, who has battled with reporters on use of the term to describe the administration's executive order.

It's not the first time Trump has lashed out at a federal judge. During the presidential campaign, Trump called out Judge Gonzalo Curiel's "Mexican heritage" after the Indiana-born judge ruled against him during the litigation over alleged wrongdoing at Trump University.

Trump called Curiel a "hater" and claimed he was being unfair to him because he is "Hispanic" and did not approve of Trump's proposed border wall between Mexico and the United States.

The Associated Press contributed to this report.