Updated on November 7 at 3:47 p.m. ET

The first Cabinet casualty of the midterm elections is Attorney General Jeff Sessions.

Sessions tendered his resignation on Wednesday, ending his tumultuous tenure atop the Justice Department that was marked both by a sharp rightward shift on criminal-justice, civil-rights, and immigration policy as well as the constant public browbeating he received at the hands of a president who regretted appointing him to the job.

In a letter to the president, Sessions made clear it was his choice to leave. “At your request,” he began, “I am submitting my resignation.” His departure—whether voluntary or not—was widely expected after the midterm elections in which Democrats recaptured the House majority while Republicans expanded their advantage in the Senate. Trump named Sessions’s chief of staff, Matthew Whitaker, to serve as acting attorney general.

The move could have immediate repercussions for the investigation being conducted by Special Counsel Robert Mueller. To Trump’s eternal frustration, Sessions recused himself from overseeing the federal probe into whether the Trump campaign in 2016 colluded with the Russian government. Deputy Attorney General Rod Rosenstein was in charge of Mueller’s investigation, but with Sessions out, responsibility will fall to Whitaker as acting attorney general. Last year, before he joined the Justice Department, Whitaker wrote in a CNN op/ed that Mueller would be overstepping his bounds if he began looking at the president’s personal finances.

The larger GOP margin in the Senate is especially important because Trump might now have the votes to confirm a new attorney general. Before the election, Republicans had warned Trump not to replace Sessions when they did not have the votes—a deficit that was due to the political blowback that would come if the president tried to oust Sessions in a transparent bid to curtail the Mueller investigation.

Sessions’s departure likely will be the first of several in the Cabinet and the senior White House staff. Reports of a looming shakeup have circulated for weeks, and Trump did little to douse them at a press conference on Wednesday. “It is no great secret,” he said. “A lot of administrations make changes after the midterms. For the most part, I am very very happy with this Cabinet.”

Trump already has to fill one vacancy created by U.N. Ambassador Nikki Haley’s announcement last month that she would leave her post at the end of the year. The president is expected to name a new nominees in the next few days.

Sessions will be the eighth Cabinet-level official to leave a post during Trump’s first two years in office. Several have resigned or been fired in scandal, while two, former Homeland Security Secretary John Kelly and CIA Director Mike Pompeo, secured promotions as part of the shuffling.

The Cabinet shuffle still pales in comparison to the high turnover among the White House senior staff, which has seen the departures via resignation or firing of the chief of staff, the chief strategist, the press secretary, multiple communications directors, and other top officials.

All the changes have kept the Senate busy confirming new Trump nominees. But Trump will have an easier time confirming replacements come January, when the Republican majority expands from 51-49 seats to either 53 or 54 as a result of gains made in Tuesday’s midterm elections.

Department of State

Original secretary: Rex Tillerson

Trump’s replacement: Mike Pompeo

Reason for change: Tillerson had been on the outs for months with Trump. He reportedly called him “a moron” in a meeting last summer, and the two diverged on key policy issues and global hot spots like Iran, Russia, and North Korea.

Background: Trump plucked Pompeo out of relative obscurity as a three-term congressman from Kansas when he nominated him to lead the CIA. Pompeo has loyally toed the president’s line on everything from intelligence matters to the question of Russian interference in the 2016 election. Before running for Congress, Pompeo served in the Army and then started an aerospace and private-security firm.

Government experience: A little over a year as CIA director, and six years in the House before that

Why Trump likes him: Pompeo is loyal. Trump and Tillerson disagreed on several important issues, including the Iran deal, the decision to withdraw from the Paris climate accord, and, more recently, the president’s approach to North Korea. Trump told reporters that by contrast, he and Pompeo have “a very similar thought process.”

Liabilities: Pompeo is a staunch conservative who quickly built a reputation as a partisan Republican in the House. He won confirmation as CIA director on a 66–32 vote, but Democrats and even a few Republicans will press him on how tough he’ll be on Russia as secretary of state.

Chances of confirmation: The Senate confirmed him on a vote of 57–42 on April 26.

Department of the Treasury

Secretary: Steven Mnuchin

Background: He’s a banker. Specifically, Mnuchin is a former senior executive at Goldman Sachs and a hedge-fund manager who bought the failed mortgage lender IndyMac from the government in 2009. He spun it off into OneWest and sold it for a huge profit five years later. Mnuchin is also a Hollywood producer whose credits include Avatar, American Sniper, and the X-Men movies.

Government experience: None

Why Trump likes him: Spot the pattern yet? He’s a successful businessman. But perhaps equally as important, Mnuchin was a relatively early convert to the Trump cause and joined the campaign as national finance chairman back in April, just as the Republican was shifting from relying on his own funds to setting up a more traditional fund-raising apparatus. Mnuchin made clear early on he wanted the Treasury job, and Trump rewarded him.

Liabilities: Goldman Sachs and foreclosures. Economic populists saw Mnuchin’s nomination by a candidate who ran against Wall Street and the “rigged” system as the ultimate betrayal. If Trump criticized Hillary Clinton for the speeches she gave to Goldman Sachs, how can he turn around and pick a man who got rich there for Treasury secretary? Moreover, while Trump hailed Mnuchin for his business savvy in making a boatload off IndyMac at the depth of the Great Recession, Democrats grilled him for the foreclosures that resulted and highlighted stories like that of an 89-year-old widow who blamed hounding by the bank for her husband’s death.

Job status: Solid. Mnuchin has annoyed Republicans in Congress at times, but he rarely if ever breaks with Trump in public and appears safe in his job.

Department of Defense

Secretary: General James Mattis

Background: Mattis is a four-star Marine Corps general who led U.S. Central Command from 2010 to 2013. He commanded forces in both the Afghanistan and Iraq wars after the 9/11 terrorist attacks. Mattis also worked with General David Petraeus to produce the field manual on battling counterinsurgents in Iraq.

Government experience: Forty-four years in the military, though none in civilian posts

Why Trump likes him: For a guy who once said he probably knows “more about ISIS than the generals do,” he certainly likes hiring them for top positions. Mattis is known as a straight shooter and a voracious reader, and Trump has gushed that he is “the closest thing to George Patton that we have.” Like Trump, Mattis is someone whose blunt talk occasionally crashes through the line of political correctness, and he has criticized the Obama-administration stance toward Iran and its strategy across the Middle East. Trump seems to value his opinion: He told The New York Times that he was “impressed” when Mattis pointedly told him that torture does not work, though it did not change the president-elect’s support for the practice. Trump also seems fond of his nickname, Mad Dog.

Job status: Safe. Trump appears to love Mattis, Republicans see him as a stabilizing force, and Democrats don’t mind him, either.

Department of Justice

Original attorney general: Jeff Sessions

Trump’s replacement: Acting Attorney General Matthew Whitaker

Background: Sessions represented Alabama in the Senate for 20 years, building up a record as a staunch critic of illegal immigration and expanded legal immigration. He’s been a conservative all around, opposing the Obama administration at nearly every turn. Before his election to the Senate, Sessions served as a federal prosecutor and then as Alabama attorney general. He might have had a lifetime appointment to the federal bench had the Senate not rejected his nomination in 1987 over allegations that he made racist comments and praised the KKK while criticizing the NAACP and the ACLU.

Government experience: Extensive. He served in the U.S. Senate since 1997 and held public office in Alabama beginning in 1981.

Why Trump likes him: He doesn’t anymore, but originally it was loyalty. Sessions was the first senator to endorse Trump’s candidacy. Sessions’s top aides also worked in the Trump transition and his policy adviser Stephen Miller eventually went on to serve as senior adviser to the president. Sessions has made his name opposing comprehensive immigration reform and citizenship for undocumented immigrants, and Trump adopted similar positions that helped vault him to the top of the GOP primary field.

Liabilities: Sessions’s liabilities in 2018 are entirely different than when Trump nominated him. Then, he faced a firestorm over his record on civil rights and immigration, as well as racist comments he reportedly made in the 1980s. Now he has drawn Trump’s unceasing ire for recusing himself from the Russia investigation and for, in the president’s view, slow-walking or stalling probes of Hillary Clinton, the Democrats, and the FBI. Trump’s animosity toward his attorney general has turned many Republicans in Congress against Sessions, some of whom have demanded his resignation.

Job status: Sessions resigned on November 7 and Trump named his chief of staff, Matthew Whitaker, as acting attorney general.

Department of Homeland Security

Original secretary: John Kelly

Trump’s replacement: Kirstjen Nielsen

Reason for change: The DHS job opened up when Trump brought in Kelly to replace Reince Priebus as White House chief of staff.

Background: Nielsen served as chief of staff to Homeland Security Secretary John Kelly and then followed him to the White House when Trump named him his own chief of staff. During the Obama administration, Nielsen ran her own cybersecurity-consulting firm.

Government experience: She previously held senior staff jobs in the Bush administration.

Why Trump likes her: The more operative phrase might be: Why Kelly likes her. The chief of staff brought her into DHS, then the White House, and was instrumental in her being named his successor at DHS. Since winning Senate confirmation on a 62–37 vote in December, she has helped formulate Trump’s immigration proposals and defended the hard line he has taken in negotiations over extending the Deferred Action for Childhood Arrivals program.

Job status: Considering how new she is in the job, probably pretty safe for the time being.

Department of Health and Human Services

Original secretary: Tom Price

Current secretary: Alex Azar

Reason for change: Price resigned under pressure in late September after spending more than $400,000 in taxpayer-funded travel bills for taking chartered flights all over the country. The scandal angered Trump, who was already unhappy with Price over Congress’s failure to repeal the Affordable Care Act.

Background: Azar was a safe and entirely conventional choice as Price’s replacement. He served in senior positions at HHS under President George W. Bush before becoming a top executive at Eli Lilly, the pharmaceutical company.

Government experience: More than six years at HHS during the Bush administration, first as its general counsel and then as deputy secretary

Why Trump likes him: Trump has tended to go with safe picks after resignations or withdrawals, and Azar fit that bill. He was experienced in health policy and though he faced opposition from most Democrats, he survived the confirmation process without much trouble and won approval on a 55–43 vote.

Liabilities: Azar’s ties to the pharmaceutical industry could run into conflict with Trump’s stated desire to bring down prescription-drug prices. But so far, the president hasn’t made a serious push to overcome Republican and industry opposition to taking on Big Pharma.

Job status: As the newest member of Trump’s Cabinet and so far free of scandal, he’s secure for now.

Department of Housing and Urban Development

Secretary: Dr. Ben Carson

Background: The conservative former Trump rival for the Republican presidential nomination has no formal experience in housing policy. He’s a retired neurosurgeon renowned for pioneering a procedure to separate conjoined twins. But what Carson brings to HUD is the personal experience of having grown up poor in Detroit. He has written and spoken extensively about his upbringing, saying that his hard work and passion for reading, along with the firm encouragement of his single mother, helped him to escape the poverty of the inner city.

Government experience: None

Why Trump likes him: Again, loyalty. Carson endorsed Trump after he dropped out of the presidential race, and though he wasn’t his most effective surrogate, he stayed with him through the ups and downs of the general election. Trump lambasted him during the primary, mocking his childhood struggle with what Trump described as “a pathological temper.” The two have long since patched things up, however. Carson was pegged for a Cabinet post early on, but it figured to be the Department of Health and Human Services, given his deep experience in medicine. Trump and Carson do appear to share an up-by-the-bootstraps philosophy toward combatting poverty, where government programs play a smaller role than they do now.

Liabilities: Carson joined several other Trump Cabinet officials in being the subject of unflattering reports over government spending. He shelled out more than $31,000 on a dining set for his office after a senior HUD official reportedly complained that “$5,000 will not even buy a decent chair” in acting out redecorating orders from Carson’s wife.

Job status: Shaky of late. Carson was reportedly one of four Cabinet members whom John Kelly reprimanded in private meetings over the poor optics of their lavish spending habits.

Department of Energy

Secretary: Former Texas Governor Rick Perry

Background: Perry served three and a half terms as the governor of Texas, succeeding George W. Bush after he became president. He then ran for president twice, failing to win the Republican nomination in 2012 and then again in 2016. His experience in energy-rich Texas would, on the surface, seem to make him a natural fit, but the Energy Department is actually more of a national-security agency that’s responsible for designing and protecting the nation’s stockpile of nuclear weapons. The past two energy secretaries were award-winning scientists.

Government experience: Three and a half terms as governor of Texas, a short stint as lieutenant governor, and eight years as Texas agriculture commissioner

Why Trump likes him: Perry is another example of a Republican who fought bitterly with Trump only to make amends. Early in the 2016 race, Perry was actually more confrontational with Trump than any other Republican. He gave an entire speech devoted to attacking him in July 2015, during which he said Trump was “a cancer on conservatism.” But Perry was out of the race a few months later, and he came around to Trump once he secured the nomination and campaigned for his election.

Liabilities: “Oops.” As Democrats reminded the public to no end, the Energy Department was the Cabinet post that Perry infamously forgot he wanted to eliminate during a Republican primary debate in 2011. Though embarrassing, that comment has faded as Perry has gone about his job with relatively little controversy over the past 14 months.

Job status: Safe. Despite having twice run for president himself, Perry has been one of the most under-the-radar Cabinet officials. In Trump’s government, that’s good for job security.

Department of Labor

Trump’s pick: Alexander Acosta

Background: Acosta is a veteran of the George W. Bush administration, having served as head of the Justice Department’s civil-rights division and later as a U.S. attorney in Florida. He also served for a year as a member of the National Labor Relations Board, and for the past eight years as dean of Florida International University’s law school.

Government experience: Extensive. Acosta served in the federal government for nearly the entire George W. Bush administration in a variety of roles.

Why Trump likes him: Acosta has a sterling academic and legal pedigree, having graduated from Harvard and clerked for future Justice Samuel Alito when he served on a federal appellate court. Trump reportedly also wanted a Hispanic in his Cabinet, and while that may have not been an overriding factor, Acosta’s nomination did check that box. Finally, as Trump noted, Acosta had already won Senate confirmation three times, and after the failure of his first labor nominee, Andrew Puzder, the president needed someone who could get the job.

Liabilities: Democrats asked about Acosta’s time in George W. Bush’s Justice Department, which overlapped with the scandal over the politicization of the hiring of U.S. attorneys. As David A. Graham wrote, Acosta’s deputy was Bradley Schlozman, who was faulted by an inspector general’s report for inappropriately considering politics and ideology when screening federal prosecutors. But Acosta was not formally rebuked, and that decade-old controversy did not derail his confirmation.

Job status: Secure

Previous nominee: Andrew Puzder, who withdrew on February 15

Department of Transportation

Secretary: Elaine Chao

Background: As labor secretary for the full two terms of the George W. Bush administration, Chao brings more civilian experience in the federal government than anyone else in Trump’s Cabinet. Before that, she directed the Peace Corps and led United Way. During the first Bush administration, Chao also served as a deputy secretary in the department she is poised to lead.

Government experience: Extensive: see above

Why Trump likes her: While Trump surely appreciated Chao’s deep experience in government and Washington, there was probably another factor in his decision to nominate her for transportation secretary: Chao is married to Mitch McConnell, the Senate majority leader and a man who holds wide sway over whether Trump’s agenda makes it into law. In particular, she’s been a key player in Trump’s push for an expensive infrastructure package.

Liabilities: Virtually none. Given her government experience and obvious qualifications for the post, Chao might be the least controversial of any of Trump’s choices so far. Her selection even won praise from Vice President Joe Biden.

Job status: Safe. Chao has taken on a bigger role with Trump finally pushing his long-awaited infrastructure proposal in Congress. And with the president no longer openly warring with Chao’s husband, the Cabinet meetings are probably less awkward.

Department of Education

Trump’s pick: Betsy DeVos

Background: DeVos is a longtime philanthropist and Republican donor, and the former chairwoman of the state party in Michigan. She’s been a major advocate for education reform centered on expanding charter schools and private-school vouchers. She led the advocacy group American Federation for Children, which pushes for increased school choice for parents. The New York Times reported on her successful effort to kill legislation in Detroit that would have imposed tougher accountability standards on charter schools.

Government experience: None

Why Trump likes her: Trump has shown that he favors plucking people from the private sector who will come in and shake up a government agency, and DeVos fits that bill. She has strong support among Republican school reformers, especially those who favor both expanding charter schools and vouchers. (Democrats favor the former but not the latter.) She is further to the right on education than two other women Trump interviewed: Eva Moskowitz, a charter-school leader in New York, and Michelle Rhee, the former chancellor of the Washington D.C. public schools.

Liabilities: DeVos barely won Senate confirmation on a 51–50 margin that needed a tie-breaking vote from Vice President Mike Pence. She hasn’t had an easy time since, facing protesters at speeches and during school visits. Most recently, she struggled to handle tough questions about public education during an interview with Lesley Stahl on 60 Minutes.

Job status: Shakier than before. White House officials were reportedly “alarmed” at DeVos’s performance on 60 Minutes, although with so much else dominating the headlines, that stumble could easily blow over.

Department of the Interior

Trump’s pick: Former Representative Ryan Zinke of Montana

Background: Zinke was a Republican member of the House who had just been reelected to his second term. He had been expected to run for the Senate in 2018, but at least for now, he’s heading the Interior Department. Zinke served for more than 20 years in the Navy SEALs before entering politics, earning numerous medals. In Congress, he has opposed the sale of federal lands but supported mining and drilling on them.

Government experience: Two decades in the military and two years in Congress

Why Trump likes him: Trump was, not surprisingly, impressed with Zinke’s military background, and the congressman reportedly impressed Trump’s son Donald Jr., an avid sportsman who was influenced by the recommendation of the Backcountry Hunters and Anglers.

Liabilities: Like others in Trump’s Cabinet, Zinke has drawn criticism and scrutiny from ethics watchdogs over his travel spending habits.

Job status: If Trump decides to clean house of scandal-plagued Cabinet officials, Zinke could be in trouble. But he has been a favorite of Trump’s adult sons, giving him possibly a little added protection in the administration.

Department of Commerce

Trump’s pick: Wilbur Ross

Background: Another billionaire, Ross is the chairman of a private-equity firm that he founded and later sold. For 25 years, he led Rothschild Inc., where he made a reputation as a turnaround specialist who bought up and restructured steel, textile, and mining companies, among other industries.

Government experience: None

Why Trump likes him: The two businessmen go back many years together and share a critical view of U.S. trade policy in the past two decades. Ross, who specialized in turning around manufacturing firms, served as an adviser to Trump during the campaign. Ross, the president-elect said in nominating him, “is a champion of American manufacturing and knows how to help companies succeed. Most importantly, he is one of the greatest negotiators I have ever met, and that comes from me, the author of The Art of the Deal.”

Liabilities: Ross has been in and out of favor with Trump, and he was roundly mocked in the press after reports emerged that he had a habit of dozing off in meetings. But his stock rose when Trump sided with him and Trade Adviser Peter Navarro over Chief Economic Adviser Gary Cohn in the debate over tariffs.

Job status: At least until Trump changes his mind on tariffs, Ross is probably safe.

Department of Agriculture

Secretary: Sonny Perdue

Background: Perdue is the former governor of Georgia, having served two terms ending in 2011. An immigration hawk, he grew up on a farm and earned a doctorate in veterinary medicine.

Government experience: Two terms as Georgia governor and a decade in the state legislature

Why Trump likes him: Trump took a while to pick an agriculture secretary and went with a drama-free southerner whose cousin David Perdue is one of the president’s closest allies in the Senate.

Liabilities: The pick initially irked Senator Chuck Grassley of Iowa, who wanted Trump to select a midwesterner for the nation’s top farm job. But Perdue had a smooth confirmation process and has been a low-key Cabinet member since.

Job status: Safe

Department of Veterans Affairs

Original secretary: Dr. David Shulkin

Trump’s first replacement: Dr. Ronny L. Jackson

Current secretary: Robert Wilkie

Reason for change: Shulkin, the only Obama-administration holdover in Trump’s Cabinet, appeared to be off to a strong start, as he received praise from the president. But over time, he drew criticism from conservatives pushing for the privatization of veterans’ health care. His relationship with his own staff also began to crumble, eventually leading to an armed guard being posted outside his office.

Background: Trump picked Wilkie in May after his first choice to replace Shulkin, Rear Admiral Ronny Jackson, withdrew his nomination amid allegations of workplace misconduct. Wilkie served in several senior positions at the Pentagon before Trump asked him to lead the VA on an interim basis after Shulkin’s ouster. With his nomination in May, the president picked him to have the job permanently.

Government experience: Wilkie has had a long career in Washington, first advising former Senator Trent Lott before joining the National Security Council and then the Defense Department under President George W. Bush.

Why Trump likes him: The president didn’t say much about Wilkie during his surprise announcement of his nomination. But presumably he likes his long experience in government and wanted a steady hand who could have a smooth confirmation after the failure of his first choice, Jackson.

Status of nomination: Confirmed on July 23 on a 86–9 vote

Key sub-Cabinet positions

Administrator, Environmental Protection Agency

Original administrator: Scott Pruitt

Trump’s pick: Vacant; Andrew Wheeler named as acting administrator

Background: Pruitt was the attorney general of Oklahoma, and in that position he led the conservative legal fight against the Obama administration’s agenda to combat climate change. Along with other Republican attorneys general, he sued to stop the administration’s climate rules—a case that is still pending in federal court. Like Trump, he has voiced doubts about the science behind climate change and its connection to manmade activities.

Government experience: Six years as Oklahoma attorney general, and eight years in the Oklahoma state Senate

Job status: Pruitt resigned on July 5.

Ambassador to the United Nations

Trump’s pick: Former Governor Nikki Haley of South Carolina

Background: Haley has been considered a rising Republican star ever since she won election as governor of South Carolina in 2010. She gave her highly sought-after endorsement to Marco Rubio in the GOP presidential primary, and she was seen as a likely vice presidential pick if Rubio had won the nomination. But Rubio didn’t, and Trump’s early selection of Haley as his nominee for UN ambassador was a bit of a surprise. She has no formal foreign-policy experience, but her background as the conservative daughter of Indian immigrants undoubtedly appealed to Trump.

Government experience: Six years as South Carolina governor, and another six as a state legislator before that

Job status: Leaving at the end of the year

Director, Office of Management and Budget

Trump’s pick: Former Representative Mick Mulvaney of South Carolina

Background: Mulvaney was a hard-line conservative in the House and a founding member of the Freedom Caucus. He was a frequent critic of former Speaker John Boehner and voted for budget and debt proposals that called for steep spending cuts across discretionary- and entitlement-spending programs. The question is whether his support for overhauling Medicare and Social Security and his resistance to major increases in defense spending will conflict with Trump, who took opposing views on the campaign trail.

Government experience: Six years in the U.S. House and four years as a state legislator in South Carolina

Job status: So secure he has not one top job but two: Trump installed him as the interim head of the Consumer Financial Protection Bureau.

Director, CIA

Original director: Mike Pompeo

Trump’s replacement: Gina Haspel

Reason for change: Trump elevated Pompeo to replace Tillerson as secretary of state.

Background: Haspel would be the first woman to serve as CIA director. She worked closely with Pompeo in over a year as deputy director, but she has a checkered past in the CIA: She oversaw the torture of a terrorism suspect in 2002 and then took part in an effort to destroy video evidence of the activity, according to The New York Times.

Government experience: Haspel spent 30 years in the CIA before rising to deputy director and, upon Senate confirmation, director.

Status of nomination: Confirmed on May 17