In blocking the administration’s second attempt at a travel ban from terror-prone countries, a federal judge in Hawaii laid the blame squarely on President Trump and his advisers, who had suggested the policy was aimed at barring Muslims.

A different politician might have expressed disappointment and moved on. But Trump, taking the stage barely an hour later at a rally Wednesday night in Nashville, let loose on the “terrible ruling” — and doubled down on the sentiments that got the policy into trouble in the first place.

“The order blocked was a ­watered-down version of the first order,” Trump thundered, adding later: “Let me tell you something. I think we ought to go back to the first one and go all the way.”

The episode was just one of numerous examples of Trump and his advisers pushing incendiary language and unfounded claims, even in the face of opposition from federal judges and top lawmakers of both parties.

On Thursday — for the 12th day in a row — the White House defended Trump’s unfounded claim that his predecessor, Barack Obama, ordered wiretaps of Trump’s New York City offices during the presidential campaign, despite a growing chorus of declarations from intelligence officials and members of Congress that nothing of the sort happened.

(Peter Stevenson/The Washington Post)

“Based on the information available to us, we see no indications that Trump Tower was the subject of surveillance by any element of the United States government either before or after Election Day 2016,” the Democratic and Republican chairmen of the Senate Intelligence Committee said Thursday in a statement.

“He stands by it,” White House press secretary Sean Spicer said of Trump’s original claim.

[Federal judge halts Trump travel ban hours before it was to take effect]

Trump boosters say his freewheeling rhetoric, in person and on social media, is a large part of his appeal and has kept him in good stead with his political base. But it is also making governing more challenging.

In recent weeks, Trump has pledged that he would provide “insurance for everybody” at a lower cost, setting an impossible standard for congressional Republicans as they seek to craft a bill to scale back Obama’s signature health-care law.

Trump has sent conflicting signals on whether he supports a “border adjustment tax,” a key component of efforts to reduce taxes that has divided Republicans in the House and Senate who are eager for Trump’s guidance.

The president’s repeated pronouncements of admiration for Russian leader Vladi­mir Putin have forced his ambassador to the United Nations and his secretary of state to reassure allies by talking tougher about an adversary blamed for meddling in last year’s U.S. election.

(Reuters)

And Trump’s allegations on Twitter — without citing any evidence — that Obama wiretapped Trump Tower last year has eaten up investigative resources in Congress and chipped away at his credibility among GOP leaders key to advancing the president’s ambitious agenda.

But perhaps nowhere have Trump’s words been as damaging as his attempts to implement the travel ban — which may have been damaged further by Trump’s remarks at his Nashville rally. Trump inflamed controversy during the campaign by calling for a temporary ban on all foreign Muslims from entering the United States, then later shifted to vague pledges to ban people from countries with a history of Islamist terrorism.

“I am sure that challengers will use the president’s comments last night as further evidence that the true intent of his executive order is to bar Muslim immigration,” said Stephen W. Yale-Loehr, a professor of immigration law at Cornell Law School.

[Trump ‘stands by’ unproven allegation that Obama ordered wiretapping of Trump Tower]

In rulings halting both the first and second attempts at a ban, judges have cited comments by Trump and his close advisers as evidence of the administration’s intent to target Muslims in a manner inconsistent with the Constitution — even as lawyers for Trump insist that is not the case.

The somewhat narrower version of the ban put on hold Wednesday would have temporarily barred the issuance of new visas to citizens of six ­Muslim-majority countries and suspended the admission of new refugees. Early Thursday, a federal judge in Maryland issued a second injunction against the measure, suspending only the portion that stopped the issuance of visas.

While some legal experts say Trump still has a strong chance of prevailing at the Supreme Court, based on arguments about executive powers, others have questioned whether comments coming from his administration have made it impossible to credibly argue that the ban is secular in nature.

Mo Elleithee, executive director of the Institute of Politics and Public Service at Georgetown University, said Trump and his advisers “seem to be validating the court’s concerns every chance they get.”

“They seem not to know when they need to keep their mouths shut,” said Elleithee, who worked on Hillary Clinton’s 2008 presidential campaign.

The proposed policy can be traced back to December 2015, when Trump — reading in dramatic fashion at a campaign rally — called for “a total and complete shutdown of Muslims entering the United States until our country’s representatives can figure out what is going on.” The statement is still available on Trump’s campaign website.

Later in the campaign, amid continuing uproar, Trump began referring to the ban as being aimed at particular nations rather than a religious group. But at times he also disputed the idea that the proposal had changed or narrowed.

“I actually don’t think it’s a rollback,” Trump said in July 2016. “In fact, you could say it’s an expansion. I’m looking now at territories. People were so upset when I used the word Muslim. ‘Oh, you can’t use the word Muslim.’ . . . And I’m okay with that, because I’m talking territory instead of Muslim.”

Also undermining the administration’s claim of secular intent was Trump’s statement on the Christian Broadcasting Network on Jan. 27 — just before the first ban went into place — that he saw persecuted Christians as a priority in accepting refugees.

And when he actually signed the measure, Trump declared: “This is the protection of the nation from foreign terrorist entry into the United States. We all know what that means.” He did not explain further.

The next day, a close Trump adviser, Rudolph W. Giuliani, appeared on Fox News and seemed to offer an explanation.

“I’ll tell you the whole history of it,” Giuliani said. “So when [Trump] first announced it, he said, ‘Muslim ban.’ He called me up. He said, ‘Put a commission together. Show me the right way to do it legally.’ ”

In his blistering 43-page opinion issued Wednesday, U.S. District Judge Derrick K. Watson in Hawaii referred to those comments as well as a recent Fox News appearance by Trump senior policy adviser Stephen Miller, who said the second attempt at a ban would have “mostly minor technical differences” and that Americans would see “the same basic policy outcome for the country.”

At Wednesday night’s rally in Nashville, Trump took aim at Watson and suggested there was little difference between the intent of his first executive order and his second.

“The order he blocked was a watered-down version of the first order that was also blocked by another judge and should have never been blocked to start with,” Trump said.

During a news briefing Thursday, Spicer said the administration had “tailored” the second order to address concerns raised about the first and said he was confident the president would ultimately prevail. Spicer said comments made by Trump and his aides, including those on Twitter, were “non-germane” and “not in keeping with how [judges] are supposed to interpret the law.”

Leon Fresco, the deputy assistant attorney general for the Office of Immigration Litigation in Obama’s Justice Department, said anything the president or those in his administration say now will likely become part of the ongoing litigation. The strongest evidence the challengers have to prove Trump intended the ban to disfavor Muslims, rather than protect national security, comes from the president’s own words and those of his close advisers, he said.

But Fresco said it is possible Trump would ultimately prevail at the Supreme Court. In particular, he said, the judge in Hawaii had not addressed head-on whether Trump and his advisers’ comments “irrevocably stain the ability to ever issue an order like this, period.”

The Justice Department has argued that the comments by Trump and his advisers should not be considered because, in the department’s view, the courts should not look beyond official statements and the order itself to determine its purpose.

Timothy Naftali, a presidential historian at New York University, said Trump had an opportunity after he was elected to set a different course but has not.

“As president, he should have said he was wrong to advocate for a Muslim ban,” Naftali said. “He’s never done that. What it appears he’s doing now is trying to do it in a way that squeaks by.”