That candidate Donald Trump was able to attack revered national institutions while maintaining his popular support was one of the great surprises of the New York billionaire’s run. That President Donald Trump might continue to attack critical national institutions while maintaining the United States’ stability, prosperity, unity, security and position in the world would be a devastating error.

That’s what’s at stake if Trump continues to undermine both the ability of our intelligence apparatus to do its job, and our confidence in it.

For weeks, Trump dismissed the consensus among U.S. intelligence agencies that the hacking of emails of the Democratic National Committee and Clinton campaign manager John Podesta, and the exposure of those emails, was done by Russians acting at the behest of top Russian government officials with the specific intent to influence the election in Trump’s favor.

Trump’s attacks infuriated intelligence officials past and present from across the political spectrum, including the director of national intelligence, James R. Clapper Jr., and they led former CIA director James Woolsey to quit Trump’s transition team.

Before his top-secret briefing Friday with intelligence leaders, Trump called the focus on the hacks a “political witch hunt.” To delegitimize this probe, he pointed to intelligence failures on the 9/11 attacks and the issue of weapons of mass destruction in Iraq. Trump argued that past hacking incidents didn’t get as much attention as this one, and he tried to divert attention by focusing on how NBC and other media outlets got hints of what intelligence leaders would tell him before his briefing on Friday.

But none of Trump’s diversions or counterarguments made sense. The intelligence community — politically varied, patriotic and honorable — has no motive to point the finger at the Russians on hacking if it isn’t true. Tracing a hack that already happened is far easier than it was to prevent the 9/11 attacks or determine whether Iraq was still building and hiding terrible weapons. Previous hacks have been part of the constant espionage chess match, not a brazen attempt to swing voters away from a candidate. And vague information leaked to the media hours before it goes public is no scandal.

Trump should re-evaluate how our spy and data-collection agencies work and whether information is properly shared and prioritized. He should be learning how crucial that work is to the nation’s safety. But his attacks were destructive when constructive action is needed.

Trump seemed to change his tune after his briefing Friday and the subsequent release of a declassified version of the report that said Russian President Vladimir Putin “aspired to help President-elect Trump’s election chances when possible by discrediting Secretary Clinton and publicly contrasting her unfavorably to him.” In a prepared statement, not a tweet, he professed “tremendous respect for the work and service” of intelligence professionals and emphasized his feeling that the hacks had not affected the election. The idea that the Russians might not have had a role and the his opponents orchestrated the situation wasn’t mentioned.

At least it was a better tone, and one Trump needs to stick with.— The editorial board