Just one week into his new job as acting attorney general, Matt Whitaker is under siege.

He’s deeply distrusted at the Justice Department. There are widespread fears that he might try to squelch investigations into President Trump. There are questions about his background — and even about whether his appointment is illegal.

Before joining the Justice Department in the fall of 2017, Whitaker was a harsh public critic of special counsel Robert Mueller. Not only did he publicly opine that the Trump campaign hadn’t colluded with Russia and that there was no obstruction of justice case against the president, but he mused about how a replacement for Jeff Sessions could rein Mueller in.

Now Whitaker is that replacement, until a permanent successor for Sessions is confirmed. And shortly after Whitaker got the gig, word leaked out from his allies that he had no intention of recusing himself regarding Mueller — positioning him to learn what the special counsel has found, and to potentially curb the probe or even end it entirely.

Whitaker’s appointment was deeply unusual. Trump departed from the Justice Department’s usual line of succession to put him in the post, using an obscure law called the Vacancies Reform Act that lets the president temporarily fill vacant positions. Critics soon put forward several different arguments that the appointment was illegal. And the matter has already made it to the federal courts — the attorney general of Maryland filed papers Tuesday trying to get Whitaker’s appointment struck down, and arguing that “[Deputy Attorney General] Rod Rosenstein is the acting attorney general.”

Whitaker’s appointment has been criticized on other grounds too — for instance, he recently served on the advisory board of a scam company that the government shut down. The backlash was severe enough that by Friday, Trump was falsely claiming that he “didn’t know Matt Whitaker.” But so far, he’s still in the job.

Who is Matt Whitaker?

Whitaker, who is now 49 years old, grew up in Iowa and attended the University of Iowa for college and then law school. After a relatively undistinguished legal career, he’d made enough friends in high places to become one of three people Sen. Chuck Grassley (R-IA) recommended to George W. Bush for a US attorney post in 2004. He got the job. (A Des Moines Register article announcing his appointment focused mainly on the fact that he played college football.)

In his five-year stint as US attorney for the Southern District of Iowa, Whitaker proved willing to court political controversy. In 2007, he was criticized for participating in an event for the Iowa Christian Alliance, a conservative-leaning political group. That same year, he indicted state Sen. Matt McCoy for alleged crimes involving his business. McCoy was eventually acquitted, and he’s argued that his prosecution was political — that the ambitious Whitaker wanted to “give the evangelical right” a “trophy” by prosecuting him, a prominent gay Democratic politician.

After exiting the US attorney’s post in 2009, Whitaker returned to law and bounced around various unsuccessful GOP political campaigns in Iowa. He also ran for US Senate in 2014, when he argued that judges should have “a biblical view of justice” and not “a secular world view” (he finished fourth in the GOP primary).

But Whitaker became better-known among national conservatives once he landed a plum gig at a conservative nonprofit group, the Foundation for Accountability and Civic Trust (FACT). At first, the group, funded by anonymous conservative donors, was all about getting Whitaker into the press so that he, a former US attorney, could accuse Hillary Clinton of committing crimes. (“I would indict Hillary Clinton,” he wrote in a 2016 USA Today op-ed.)

When Trump won, Whitaker pivoted — his new job seemed to be arguing that Trump and his associates didn’t commit crimes, particularly in relation to Mueller’s investigation. This hackishness landed Whitaker a CNN contributor gig, since the network wanted some reliable Trump defenders.

Whitaker reportedly said privately that his goal with these on-air remarks was to impress the cable TV-obsessed president and get nominated as a judge. It partly worked — the New York Times reports that Trump did enjoy Whitaker’s TV appearances. But the president had other plans for him.

Whitaker was a White House ally at the Justice Department

In March 2017, Attorney General Jeff Sessions announced that he would recuse himself from the FBI’s investigation into Trump associates’ ties to Russia and potential interference with the campaign. Sessions did so on the advice of department ethics lawyers (he’d been involved with the campaign). But Trump responded with fury, claiming that he expected his attorney general to protect him from investigations like these.

Their relationship never recovered. Trump berated Sessions privately and, starting in July 2017, mocked and insulted him publicly in an apparent effort to goad him into resigning. But Sessions stayed in the job, and at that point, Trump was unwilling to take the political risk of actually firing him (key Republican senators were urging him not to).

So the White House appears to have hatched a different plan. In August 2017, the job of Sessions’s chief of staff was open. Whitaker was already on Trump’s radar — per the New York Times, he’d been interviewed about joining the White House “as a legal attack dog” against Mueller. But the White House instead urged Sessions to hire Whitaker as his chief of staff, and the AG agreed.

Whitaker seems to have been put in place to keep an eye on Sessions and the Justice Department. He often spoke on the phone with Trump and White House Chief of Staff John Kelly. He went over to meet Trump more than a dozen times (usually with Sessions). He gained a reputation in the DOJ as “a partisan and a White House spy,” the New York Times reported. And when Trump would rant about the Mueller probe, Whitaker often “smiled knowingly and nodded in assent,” the Washington Post reported.

How Whitaker got Sessions’s job

Rumors that Trump was on the verge of firing either Sessions or Rosenstein have been omnipresent this year. And in retrospect, it’s now clear that the White House has for some time had Whitaker in mind as a replacement for whoever went first. (When it briefly appeared that Rosenstein was on the way out in September, word leaked out that the White House had planned to name Whitaker to succeed him.)

Trump didn’t end up taking any action before the midterms — but the very next day after they were over, he had Kelly call Sessions. The message was that Trump wanted Sessions out, and would name Whitaker to replace him.

What happened next was dramatic, according to CNN’s Evan Perez, Laura Jarrett, and Ariane de Vogue. Top Justice Department officials huddled in Sessions’s office and urged him to try to delay the effective date of his resignation by a few days, while Whitaker held his own “huddle” of loyalists in a different office just “a few yards away.” But eventually, Whitaker asked to speak to Sessions alone — and after they spoke, Sessions told his own group that he’d leave that day.

Thus, Whitaker completed his 13-month ascent from TV pundit to the top law enforcement official in the United States. But immediately, controversy swirled around his appointment — over whether he’d politically interfere with investigations, over shady aspects of his business history, and over the appointment’s very legality.

The controversies over Whitaker politically interfering with investigations

The entire reason Trump so badly wanted Sessions gone was because he had recused himself from oversight of the Russia investigation. Now Trump has replaced him with someone who has not only criticized the probe but has even publicly mused about how it could be squelched.

Indeed, between May and September 2017 — before he got the job as Sessions’s chief of staff — Whitaker said or tweeted:

It sure looks like Trump may have put in Whitaker as a hatchet man, to end the probe or at least to better “protect” Trump from it.

Whitaker now has the power to do many things. He could refuse to sign off on certain new investigative moves (like a subpoena of the president) or further expansion of the probe. He could try to ensure that, should Mueller write a report on Russian interference, it wouldn’t be given to Congress. He could demand a detailed briefing on the state of the investigation and then leak information he learns to Trump. He could even try to fire Mueller outright.

Then there’s the potential for Whitaker to launch politicized investigations into Trump’s enemies. Murray Waas reported for Vox that he has already been involved in such discussions this year — that as Sessions’s chief of staff, he tried to pressure the Justice Department to comply with Trump’s demands to launch investigations into Hillary Clinton and others.

Whether Whitaker will actually do any of this remains to be seen. His every move will be under a microscope, scrutinized by officials under him and, soon, a House Democratic majority. He could even expose himself to potential legal risk for obstruction of justice, should he interfere.

Last week, two people close to Whitaker told the Washington Post that Whitaker had no intention of recusing himself from oversight of Mueller’s probe. But in a statement Monday night, a Justice Department spokesperson said Whitaker is “fully committed to following all appropriate processes and procedures” at DOJ, including “consulting with senior ethics officials” on “matters that may warrant recusal.”

The controversy over Whitaker’s business history

Entirely separate from all matters relating to Mueller, Clinton, and other political issues, questions arose about a rather shady-looking part of Whitaker’s recent business history: his service on the advisory board of a company called World Patent Marketing.

The Miami-based company claimed it would help inventors get patents and then would help promote their inventions. But customers said World Patent Marketing was just a scam. The company “simply took cash without ever meeting or reviewing any pitches,” and as it raked in more than $26 million, “virtually none of the firm’s clients ever made money,” the Miami New Times reported.

The firm’s CEO had donated to Whitaker’s Senate campaign in 2014, and that year, Whitaker agreed to serve on World Patent Marketing’s advisory board. “As a former US Attorney, I would only align myself with a first class organization,” he was quoted saying in a 2014 press release.

World Patent Marketing was also infamous for threatening customers who went public about their disgruntlement — and Whitaker participated. He emailed a customer that he was a former US attorney and that “smearing” World Patent Marketing online could lead to “serious civil and criminal consequences,” per the New Times.

The Federal Trade Commission eventually forced the company to shut down in 2017, and an FBI criminal investigation into the firm is ongoing, according to the Wall Street Journal. In October 2017, the FTC even subpoenaed Whitaker for records related to this company. But, per the Washington Post’s sources, Whitaker then “failed to provide any information, telling investigators that he was busy at that time moving from Iowa to Washington for a new job.”

It’s not clear how deeply Whitaker was involved in the company or how much he knew about the business practices — but needless to say, none of this reflects very highly on the new acting attorney general’s ethics or judgment.

Then, separately from that, the AP’s Ryan Foley and David Pitt reported on how a company of Whitaker’s “walked away from a taxpayer-subsidized apartment-rehabilitation project in Iowa after years of cost overruns, delays and other problems.” (A DOJ spokesperson blamed the debacle on “a bad general contractor.”)

The controversy over whether Whitaker’s appointment is legal

Finally, beyond any of Whitaker’s personal traits, there’s yet another set of controversies around the legality of his appointment.

Trump appears to have named Whitaker acting AG by using a law called the Vacancies Reform Act. Passed in 1998, the VRA gives the president some leeway to go outside the ordinary line of succession to temporarily fill Cabinet jobs that become vacant, putting in acting appointees of his choice who either have been confirmed by the Senate for another post or have worked in a top job in the relevant department.

This law had been somewhat obscure until President Trump started using it for high-profile, controversial appointments of loyalists — for instance, he put in Mick Mulvaney as the acting director of the Consumer Financial Protection Bureau, Robert Wilkie as acting veterans affairs secretary, and now Whitaker as acting attorney general.

But several legal questions have been raised about Whitaker’s appointment, and we can think about them in two buckets:

Statutory questions: Some have asked whether the VRA conflicts with a separate law about DOJ’s succession. Others have pointed out that the VRA is about replacing officials who resigned, and questioned whether Sessions’s Trump-ordered exit counts as a firing instead (though Sessions did use the word “resignation”).

Some have asked whether the VRA conflicts with a separate law about DOJ’s succession. Others have pointed out that the VRA is about replacing officials who resigned, and questioned whether Sessions’s Trump-ordered exit counts as a firing instead (though Sessions did use the word “resignation”). Constitutional questions: In an op-ed last week, lawyers Neal Katyal and George Conway argued that there that there is a constitutional problem with using the VRA to appoint Whitaker — because he wasn’t confirmed by the Senate for this stint in government. The Appointments Clause of the Constitution, they say, requires a “principal officer” of the executive branch to be confirmed by the Senate. Former Bush Justice Department official John Yoo agreed, saying “the statute is unconstitutional when applied in this way.”

Other legal experts have argued that Trump’s appointment of Whitaker is probably legal after all. “For better or worse, Congress in 1998 authorized the president to name agency officials not confirmed by the Senate” as acting appointees, University of Texas law professor Stephen Vladeck writes. He added that “there’s no textual basis in the Constitution” for the courts to require acting top appointees be Senate-confirmed.

The stakes here are enormously high — if the courts deem Whitaker’s appointment illegal, any action or decision he’s involved in as acting AG could come under legal scrutiny. On Wednesday, the Justice Department’s Office of Legal Counsel issued an opinion that Whitaker’s appointment was legal and constitutional. But the matter had already made it into court by then, with Maryland Attorney General Brian Frosh arguing in an Obamacare-related lawsuit that Whitaker’s appointment is illegal.

What comes next?

Despite all this, Whitaker currently remains in place. And unless Trump decides to oust him, he’ll likely remain at the top of the Justice Department until a new attorney general is both nominated and confirmed by the Senate — a process that could take months.

So the long-awaited showdown between President Trump and his Justice Department could finally be coming.

We don’t have a very good idea of what’s been going on behind the scenes with Mueller’s investigation lately. Some rumors claim new indictments are imminent, while others claim Mueller is close to finishing up. But we don’t truly know what evidence he’s amassed, who’s in the crosshairs, or what the special counsel’s hoped-for next move might be.

So depending on where Mueller is in the probe and what he’s found, and how Whitaker responds, we could see a true crisis over whether investigations into the president and his associates will still be permitted — or whether Trump will manage to bend the Justice Department to his political will.