Allison Shelley / Reuters Acting Attorney General Matthew Whitaker

The day after the midterm elections, President Donald Trump’s chief of staff told Jeff Sessions, who the Senate confirmed to serve as attorney general in February 2017, to resign — that day. Sessions’ own chief of staff, Matthew Whitaker, would be named acting attorney general. That basically was the high point for Whitaker, as almost every news cycle since has included new questions about whether he should be in the job — questions about the legality of his appointment but also about his qualifications. On Friday night, the Washington Post declared, “There is no way this man should be running the Justice Department.” On Saturday, George W. Bush’s former attorney general, Alberto Gonzales, questioned Whitaker’s appointment to NPR, saying it “confounds” him. By Sunday, the editor of the conservative Free Beacon called Whitaker “one of our lesser qualified attorney generals, if I can be charitable.” And, in as clear a sign as any in the Trump era that Whitaker had lost control of the narrative, the acting attorney general locked down his wide-ranging, opinionated Twitter account on Friday to hide it from public view. So, what happened? The first question is: How was Whitaker appointed? Unlike for many positions, the White House never put out a formal statement announcing his appointment. Trump simply tweeted the news.

We are pleased to announce that Matthew G. Whitaker, Chief of Staff to Attorney General Jeff Sessions at the Department of Justice, will become our new Acting Attorney General of the United States. He will serve our Country well....

By law, Deputy Attorney General Rod Rosenstein is the No. 2 at the Justice Department — the first deputy, as federal law references. Under a 1988 law, if a federal officer “dies, resigns, or is otherwise unable to perform the functions and duties of the office,” the first deputy becomes the acting officer by default.

But there are other options. The president, under a 1998 law called the Federal Vacancies Reform Act (FVRA), is given other options. The president — and only the president — can name any other Senate-confirmed individual in the government as the acting officer. The law also authorizes the president to name a person as the acting officer if they serve within the agency in question at a high-ranking level and have been there for more than three months, even if the position does not require Senate confirmation. Under the law, then, Whitaker, who has been serving as Sessions’ chief of staff for more than a year, would be eligible to serve as the acting attorney general under that final provision. Don’t forget the Constitution! That’s not the end of the matter, though. Under the Constitution, certain executive positions must be filled by people who receive the advice and consent of the Senate. The Constitution states that the president “shall nominate, and by and with the advice and consent of the Senate, shall appoint … officers of the United States.” It goes on to say that Congress can pass laws to allow either the president, courts, or the heads of departments to appoint “inferior officers,” officials who are answerable to someone else (besides the president) and do not need to be confirmed by the Senate. The question, then, comes down to whether someone “perform[ing] the functions and duties” of an officer in an acting role under the FVRA is an officer — in which case the Constitution requires Senate confirmation — or is a type of “inferior officer” who can be authorized by the Congress. Bring in the lawyers. That question has led to several days of debate over whether Whitaker can serve as acting attorney general. In the New York Times, Neal Katyal, who served as acting solicitor general in the Obama administration, and George Conway, a conservative lawyer who has clashed with Trump even as his wife Kellyanne defends the president, argued that the Constitution requires Senate approval for Whitaker to take on the job, even temporarily. They, and others, point to a 2017 opinion by Justice Clarence Thomas in which he detailed his view that the Appointments Clause lays out the “exclusive process” for appointing officers. The case involved whether an individual could serve as “acting general counsel” to the National Labor Relations Board (NLRB) without having been confirmed by the Senate. Although the majority ruled that the service was not permitted under the 1998 law, Thomas went further, noting that the dissenting justices believed the service was allowed under the FVRA, setting up what he called “grave constitutional concerns” because, as he wrote, “the Appointments Clause forbids the President to appoint principal officers without the advice and consent of the Senate.” In their op-ed, Katyal and Conway concluded, “What goes for a mere lawyer at the NLRB goes in spades for the attorney general of the United States, the head of the Justice Department and one of the most important people in the federal government.” Steve Vladeck, a law professor at the University of Texas, disagreed, pointing to a much older case — from 1898 — that detailed how the Supreme Court resolved a question about whether a vice consul in then-Siam, who was not confirmed by the Senate, was properly authorized to take on the duties of the consul temporarily due to the consul’s illness. In that situation, the court held that the appointment was permitted.

Eduardo Munoz Alvarez / Getty Images Demonstrators in Times Square after Trump forced Sessions to resign.