The saga of a special counsel investigation into whether the 2016 Trump presidential campaign colluded with Russia to win that year’s election took an expected but jarring twist on Wednesday, shifting media focus sharply away from Tuesday’s midterm vote.

Attorney General Jeff Sessions has resigned under pressure from President Donald Trump, allowing a Trump ally and critic of special counsel Robert Mueller to assume the role of overseeing the ongoing investigation.

Under the terms of Mueller’s appointment to conduct the investigation, the attorney general has authority to oversee the use of Department of Justice resources. But Sessions voluntarily recused himself from matters relating to the investigation because of his role in the Trump campaign, ceding oversight to Deputy Attorney General Rod Rosenstein.

Trump announced on Twitter that Sessions’ chief of staff Matthew Whitaker would now serve as acting attorney general. Whitaker has publicly commented on the role he has now been thrust into, envisaging an acting attorney general crippling the special counsel investigation without directly firing Mueller.

“So I could see a scenario where Jeff Sessions is replaced with a recess appointment and that attorney general doesn’t fire Bob Mueller, but he just reduces his budget to so low that his investigation grinds to almost a halt,” Whitaker said on a CNN panel in July.

Democratic lawmakers lashed out at the move, with Senate Minority Leader Chuck Schumer warning of a “constitutional crisis.”

House Minority Leader Nancy Pelosi, who is expected to become Speaker after the Democratic House victory in Tuesday’s election, said that Whitaker should recuse himself because of his previous comments.

The timing of the announcement that Sessions had resigned took reporters by surprise, as it came shortly after a press conference during which the president suggested that decisions on cabinet changes would come at a later date. Sessions had submitted his letter of resignation earlier in the day.

The next Congress, which will for the first time in Trump’s presidency include a Democratic-controlled chamber, first meets in January of next year. While Democrats will gain powers to investigate and subpoena the president when they assume leadership of House committees, in the meantime Trump can expect little pushback from a lame-duck, Republican-held Congress.