FBI Director Christopher Wray — asked by NBC News in an exclusive interview broadcast Wednesday about the termination last week of Deputy Director Andrew McCabe — said he would never allow politics to affect the way he runs the agency.

"I am committed to doing things objectively and independently and by the book." Wray told NBC News' Pete Williams. "I think that has to extend not just to our investigations, our intelligence analysis, but it also has to extend to personnel decisions and disciplinary decisions."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Wray said he was not addressing the details of McCabe's termination, but maintained that he was committed to not allowing politics to be a factor in making decisions at the FBI.

"I want to be careful about what I can say about the process" of McCabe's firing, Wray said. "But I will tell you that my commitment to making sure that our process is followed, that it relies on objective input, and that most importantly, it is not based on political or partisan influence is something I am utterly unyielding on."

The interview came just days after Attorney General Jeff Sessions, late Friday night, accepted the recommendation that he fire McCabe — who took the reins of the agency in the turbulent days after the abrupt firing of James Comey as director — two days before he was to retire and become eligible for full pension benefits.

Though McCabe — who had been attacked by President Donald Trump — stepped down as deputy director in late January, he remained on the federal payroll, planning to retire on Sunday, his 50th birthday. The firing places his full federal pension in jeopardy.

In a statement released after the termination was announced, McCabe said: "This attack on my credibility is one part of a larger effort not just to slander me personally, but to taint the FBI, law enforcement and intelligence professionals more generally. It is part of this administration’s ongoing war on the FBI and the efforts of the special counsel investigation, which continue to this day. Their persistence in this campaign only highlights the importance of the special counsel’s work."

In a segment of his interview with NBC News released Tuesday night, Wray wouldn't address the topic, saying that he didn’t feel any political pressure and that he was "committed to doing this job by the book."

See more of Williams' interview with Wray on Wednesday evening on NBC’s "Nightly News" and the "Today" show on Thursday morning.