Dan Coats, the director of national intelligence, will leave the administration on August 15, President Trump announced in a tweet on Sunday.

The president said he will nominate Rep. John Ratcliffe (R-Texas) to replace him.

"A former U.S. Attorney, John will lead and inspire greatness for the Country he loves," Trump said. He added, "I would like to thank Dan for his great service to our Country."

Axios reports that Trump "was thrilled by Ratcliffe's admonishment of former special counsel Robert Mueller in last week's House Judiciary Committee hearing."

Coats, in contrast, doesn't say much in public. But when he has commented, he has often been at odds with the man who appointed him — President Trump.

At a 2018 summit between Trump and Russian leader Vladimir Putin, the U.S. president questioned whether Russia interfered with the 2016 presidential election.

Coats took a highly unusual step by issuing a blunt statement on behalf of the U.S. intelligence community:

"We have been clear in our assessments of Russian meddling in the 2016 election and their ongoing, pervasive efforts to undermine our democracy, and we will continue to provide unvarnished and objective intelligence in support of our national security."

In a rare interview, Coats spoke with NBC's Andrea Mitchell in July 2018. In mid-conversation, she informed him of a breaking news report that the White House had invited Putin to Washington.

Clearly taken by surprise, Coats jokingly asked her to repeat it. She did.

"OK. That's going to be special," Coats said, prompting laughter from the live audience.

Behind the scenes operator

A former Republican senator from Indiana, Coats, 76, is known for his avuncular manner that once prompted a colleague to dub him the Mr. Rogers of the Senate.

Coats operated mostly behind the scenes as director of national intelligence, a position that oversees the country's 17 intelligence agencies.

Yet this low-key approach did not prevent Coats from being drawn into the recurring clashes between Trump and the intelligence community.

Coats testified before the Senate Intelligence Committee in January, shortly after Trump declared that North Korea and its nuclear program was no longer a threat.

"We currently assess that North Korea will seek to retain its (weapons of mass destruction) capabilities and is unlikely to completely give up its nuclear weapons and production capabilities because its leaders ultimately view nuclear weapons as critical to regime survival," Coats said.

Around the same time, Trump also said the Islamic State had been completely defeated.

But at that Senate hearing, Coats said: "While we have defeated the caliphate, with a couple of little villages left, we should not underestimate the ability of terrorist groups, particularly ISIS."

Afterward, Trump met with Coats and other senior intelligence leaders, and was asked about their remarks that contradicted the president's statements.

"They said they were totally misquoted. It was taken out of context. I'd suggest that you call them. They said it was fake news," Trump said.

Coats was never seen as close to Trump, though they met often. Coats and CIA Director Gina Haspel were regulars at the president's intelligence briefing, held most weekday mornings at the White House.

And by serving more than two-and-a-half years in his job, Coats outlasted most everyone else in the president's inner circle of national security and foreign policy advisers.

Trump has already parted ways with two national security advisers, two homeland security chiefs, a defense secretary, a secretary of state and a U.N. ambassador.

The only survivor from Trump's original team is Mike Pompeo, who began as CIA director and is now secretary of state.

Vince Houghton, the historian at the International Spy Museum, says Coats deserves high marks in one key area.

"He's been someone who is willing to tell the truth, even if the main consumer, and that's the president of the United States, does not like what he has to hear," Houghton said.

But, he added, to be successful in Coats' post, you have to do more than simply provide the unvarnished truth.

"I don't care how good you are at presenting accurate information to your primary consumer, if your primary consumer is ignoring you, and not willing to listen to the conclusion of the intelligence community, then the job is not being done," Houghton said.

A new focus

During Coats' tenure, the intelligence community has shifted its focus from radical Muslim groups like ISIS and al-Qaida and spent more time on large, state rivals.

Coats said the U.S. should concentrate on what he called the "big four."

"China, Russia, North Korea, and Iran – all of which pose unique threats to the United States and our partners," he told the Senate Intelligence Committee in January.

Coats was also an advocate of stronger election security, though he worked for an administration that's been criticized for not doing enough to safeguard against possible interference.

In one of his final acts, Coats named Shelby Pierson, a veteran of the intelligence community, to serve in a new position as the overall head of election security efforts.

"Election security is an enduring challenge and a top priority," Coats said.

Copyright 2019 NPR. To see more, visit https://www.npr.org.