The relationship between a new president and the intelligence agencies that serve him can be difficult in the best of times. But it’s hard to imagine a more turbulent transition than the current one, which has been marred by assertions that the administration has tried to both politicise and marginalise intelligence gathering.

No White House likes it when intelligence agencies — such as the National Security Agency, the Central Intelligence Agency or the Defence Intelligence Agency — deliver bad news, or when that information undercuts the executive’s preferred policies or political positions. But I can’t remember another White House so quick to dismiss those agencies’ judgements or so willing to discredit them as dishonest or incompetent.

We’ve seen presidential tweets with “intelligence” in accusatory quotation marks, a kind of dog whistle that equates intelligence assessments with news reporting that the president condemns as “fake.” In addition to lumping the intelligence agencies in with the “dishonest” mainstream media, the president has compared his espionage services to Russians, Nazis and WikiLeaks.

Last weekend, Trump accused former president Barack Obama of ordering phones at Trump Tower tapped during the 2016 campaign, a claim so outrageous that James Clapper, the former director of national intelligence, denied it a day later. (So did the FBI director, James Comey) And last month, Trump blamed the intelligence community, along with the press, for the downfall of his first national security adviser, Michael T. Flynn, saying on Twitter that “information is being illegally given to the failing @nytimes and @washingtonpost by the intelligence community (NSA and FBI?).”

As the former director of both the NSA. and the CIA, I know that leaks are a real problem that can endanger national security. But why would the administration reflexively and punitively blame its own services for leaks, since we do not yet know who is responsible for them?

The president has asserted that the leaking will stop “because now we have our people in,” a choice of words that creates more than a little shudder in the ranks of intelligence professionals, who prefer to work in the background for presidents, Democratic or Republican.

Trump may not appreciate the size of that community — 17 separate agencies, more than 100,000 workers, from analysts to computer programmers to case officers. So far he has put in place only Mike Pompeo, the director of the CIA, while his choice for director of national intelligence, Dan Coats, awaits confirmation.

He may also not appreciate that new presidents rarely make major changes to the intelligence agencies, a tradition of treating the intelligence community as apolitical professionals that has been handed down from administration to administration for decades. In 2009 only I, the director of the CIA, and Mike McConnell, the director of national intelligence, were quickly swapped out. Obama even personally intervened to keep in place the rest of the CIA team that served former president George W. Bush. In 2001 president Bush replaced no one.

That apolitical spirit was reflected in Pompeo’s tribute to the professionalism and dedication of his predecessor, John Brennan, even as Trump was condemning Brennan.

Pompeo’s personal closeness and access to Trump has helped the intelligence community get over some of the hard feelings generated by the president’s dismissal, even before he was elected, of its flagship product — the President’s Daily Brief —which Trump deemed unworthy of his daily attention.

But there is no evidence that Pompeo or anyone else in the community was consulted before the administration’s chaotic rollout of its original executive order banning the entry of people from seven predominantly Muslim countries. (I signed a friend-of-the-court brief that said the order made America less safe.)

Even more troubling are press reports that the administration ordered intelligence agencies to build a case for why these countries represent a danger sufficient to justify the redrafted executive order. Starting with a policy and then asking intelligence professionals to provide the rationale is a corruption of a healthy process, where solid intelligence rather than campaign hyperbole should set the context for discussion.

The politicisation became even more troubling when the White House chief of staff, Reince Priebus, cited anonymous intelligence sources to claim that the investigation into links between aides to Trump’s campaign and Russia was dead. “I can assure you, and I’ve been approved to say this, that the top levels of the intelligence community have assured me,” Priebus said, that the allegation “is not only grossly overstated, but also wrong.”

Priebus’s language was political, emotional and dismissive. It in no way even tried to mirror the precise phrasing of intelligence. Indeed, one intelligence official was moved to pointedly deny any involvement in drafting or approving Priebus’s specific comments, according to The Washington Post.

This is exactly where intelligence professionals do not want to be: thrust into the partisan arena of political masters who have different rules, vocabulary, goals and standards. It reminds me of the Benghazi controversy, in which the intelligence community became entangled in a sustained political fracas that led to charges that it was cooking intelligence to protect the Obama administration. I don’t envy Pompeo and Coats. They have to run complex enterprises and produce quality intelligence even as they push back against an administration that has questioned their officers’ integrity, has been casual in its use of intelligence and is not above calling on intelligence professionals to provide political cover.

And they must push back hard, because whether Trump appreciates it or not, he, and the country, need an independent intelligence enterprise, not a compliant one.

— New York Times News Service

Michael V. Hayden, the director of the Central Intelligence Agency from 2006 to 2009 and the National Security Agency from 1999 to 2005, is the author of “Playing to the Edge: American Intelligence in the Age of Terror.”