President Trump announced on Twitter Sunday that he will nominate Rep. John Ratcliffe (R-Texas) to replace Dan Coats as director of national intelligence, confirming Axios' earlier reporting that Ratcliffe was favored for the job. Coats will leave office on August 15.

Behind the scenes: Trump was thrilled by Ratcliffe's admonishment of former special counsel Robert Mueller in last week's House Judiciary Committee hearing. "The special counsel's job, nowhere does it say that you were to conclusively determine Donald Trump's innocence or that the special counsel report should determine whether or not to exonerate him," Ratcliffe, a former prosecutor, said to Mueller.

"I agree with Chairman Nadler this morning when he said Donald Trump is not above the law," Ratcliffe added. "But he damn sure should not be below the law, which is where Volume II of this report puts him."

But while Ratcliffe's performance in the Mueller hearing helped his chances for the DNI appointment, it wasn't what put him on the president's radar. Advisers to Trump said the president was already seriously considering Ratcliffe to replace Coats. Trump had previously shortlisted Ratcliffe to replace Jeff Sessions as attorney general before he ultimately chose William Barr.

The New York Times' Maggie Haberman was the first to report that Ratcliffe was in the mix to replace Coats as DNI. And CNN reported that Ratcliffe was under consideration for an unspecified job in the administration.

The big picture: Trump has been mulling replacing Coats since at least February, as Axios recently reported. The director of national intelligence serves as an overseer of the U.S. intelligence community and a close adviser to the president and National Security Council, producing each day's top-secret Presidential Daily Brief.

Trump has privately said he thinks the Office of the Director of National Intelligence represents an unnecessary bureaucratic layer and that he would like to get rid of it. He has been told that eliminating the ODNI is not politically possible, but he would still like to "downsize" the office, the source said.

Between the lines: Coats has rankled Trump more than once with his public comments, according to sources with direct knowledge. He angered Trump when he appeared to criticize the president's relationship with Russian President Vladimir Putin during an on-stage interview with NBC's Andrea Mitchell at last year's Aspen Security Forum.