President Trump’s attempts to block travelers from a handful of countries — most of them predominantly Muslim — from coming to the United States hit another legal snag on Tuesday, when a federal judge in Hawaii issued a nationwide order freezing most of Mr. Trump’s third travel ban the day before it was to take effect.

At least for now, the judge’s order will prevent the Trump administration from stopping almost all travel to the United States indefinitely from most of the countries named in the ban. A federal judge in Maryland issued a similar order on Wednesday morning.

The ban, now in its third iteration, was one of Mr. Trump’s earliest and most controversial decisions after taking office in January, and it has also been one of the most legally troubled. Both previous versions were ordered halted by federal district judges who said they violated the Constitution or exceeded the president’s authority, and those orders were upheld on appeal.

The Supreme Court was scheduled to review the second version of the order when Mr. Trump issued the third. Given the litigation surrounding the travel bans, the Supreme Court seems likely to take an interest in the current version as well.