President Donald Trump makes no secret of his litmus test for an attorney general: They should be loyal to the president first, and the rule of law second. He’s invoked Robert Kennedy and Eric Holder as models for their loyalty and their purported efforts to quash politically damaging investigations. A pliant attorney general would allow the president to demolish the Justice Department’s traditional independence, which Trump resents. “I am not supposed to be doing the kind of things that I would love to be doing, and I am very frustrated by it,” he lamented last November.

From that vantage point, Matt Whitaker is perfectly suited to be the interim leader of the Justice Department, where he will oversee special counsel Robert Mueller’s Russia investigation. Whitaker, the U.S. attorney in Iowa from 2004 to 2009, previously served as former Attorney General Jeff Sessions’ chief of staff since last summer. From there, he’s reportedly acted as the White House’s “spy” inside Sessions’s office and curried favor with the president’s top aides. Trump named him acting attorney general after forcing Sessions to resign on Wednesday.

The post is one of the most sensitive and powerful jobs in any presidential administration. Despite this, Trump professed ignorance on Friday about the man he had just chosen to lead the federal government’s law enforcement apparatus. “I don’t know Matt Whitaker,” he told reporters outside the White House before praising the acting attorney general’s credentials. “Matt Whitaker worked for Jeff Sessions, and he was always extremely highly thought of, and he still is.”

By any standard other than Trump’s, however, Whitaker seems stupendously unqualified for the job. Previous attorneys general served as governors, senators, and federal judges before taking the post. Interim ones typically came from within the Justice Department’s upper echelons. Before joining Sessions’s staff last year, Whitaker worked in private practice at a small law firm, mounted a failed U.S. Senate bid in Iowa, made TV appearances as one of CNN’s myriad contributors, and sat on the advisory board of a company accused by the Federal Trade Commission of running a multi-million dollar scam.

So why would the president elevate Whitaker from relative obscurity to one of the most powerful posts in the federal government? After all, Deputy Attorney General Rod Rosenstein is still available to oversee the Justice Department until Trump nominates—and the Senate confirms—Sessions’s replacement. The answer seems to lie in the president’s hostility toward the Russia investigation, a view largely shared by Whitaker. By appointing Whitaker and supplanting Rosenstein’s oversight of Mueller, Trump is now well-positioned to curtail the inquiry just as it draws closer to his inner circle.