A major shake-up of the Pentagon’s civilian leadership has thrust top military officers into a fraught position amid mounting concerns that the White House could use a chaotic transition period to push through potentially destabilizing decisions or attempt to block the handover to a Biden administration.

The role of Gen. Mark A. Milley, chairman of the Joint Chiefs of Staff and the country’s top officer, and other military leaders takes on new significance in the wake of President Trump’s ouster this week of Defense Secretary Mark T. Esper and the installation of White House loyalists in powerful Pentagon roles.

Trump named Christopher Miller, a counterterrorism official who only months ago was assigned to a mid-level Defense Department job, as acting Pentagon chief, and elevated others from the White House orbit to key policy and intelligence roles.

The Post's Lisa Rein explains how the Trump administration is adding challenges to the transition process for President-elect Joe Biden. (The Washington Post)

The arrival of civilian leaders seen as zealous proponents of Trump’s foreign policy goals, which have collided with traditional Pentagon positions, has the effect of isolating military leaders such as Milley, who with Esper has counseled a cautious approach to matters including NATO and shielding the military from partisan politics.

The changes could be particularly consequential in defining the endgame in America’s longest war, as Trump pushes for a swift withdrawal of remaining forces from Afghanistan and military leaders seek to avert what they believe could be a rash and calamitous outcome.

“In the historical sweep of the Pentagon, 70 days isn’t much,” said John Gans, who served as chief speechwriter under Defense Secretary Ash Carter, referring to the time remaining before the Jan. 20 inauguration. Gans noted that the United States has been at war in Afghanistan for nearly 7,000 days. “But in the life of Mark Milley, 70 days is going to feel like a lifetime,” he said.

The military, with its nonpartisan traditions and career workforce accustomed to constant command rotations, represents an important element of continuity in ordinary presidential transitions. As presidents and parties change, military leaders often straddle administrations. But the events of recent days have generated alarm among many Pentagon officials.

“Chris Miller: Where the hell did he come from?” one Pentagon official said. “It’s hard not to feel like there is an ulterior motive for their selection, and people recognize that.”

“It’s ‘The Twilight Zone,’ ” the official said. “No one knows what’s going to happen next.”

The Pentagon turmoil occurs as Trump increases pressure on the military brass to end the war in Afghanistan before the end of his term. Some White House and Pentagon officials have argued that the United States should cut the size of the force in Afghanistan from about 5,000 to a small counterterrorism force consisting of several hundred troops by the end of the year.

The issue is politically potent for Trump, who since his time as a candidate has argued for walking away from seemingly endless counterinsurgency conflicts and directing military resources at home. One senior White House official said Esper’s ouster was a result most directly of the opposition he, like military leaders, had expressed to Trump’s withdrawal plans.

“The biggest frustration with Trump was the troops not coming out,” the official said.

As violence surges in Afghanistan despite faltering peace talks between the Afghan government and the Taliban, the official said, the Pentagon remains resistant to an immediate exit, arguing that a hasty withdrawal would necessitate abandoning billions of dollars worth of military equipment and leave the Afghan government vulnerable to being overrun by militants.

National security adviser Robert O’Brien and other aides have told Trump that Milley is not listening to them on troop withdrawals, the official said.

It's not clear whether Trump is willing to buck his generals who fret that such a speedy withdrawal would be logistically difficult and a recipe for chaos or a return to civil war in Afghanistan. The plan, proposed earlier this year, set a goal of getting down to a few hundred troops by May 2021, assuming the peace talks moved forward and conditions on the battlefield allowed for it.

But some top White House officials, including Trump, are pressing to accelerate that timeline even though peace talks do not appear to be progressing. For now, no decision has been made.

Another senior White House official involved in Afghanistan policy said that no drastic changes have been made to the Pentagon’s withdrawal plan. “The plan as briefed by the Pentagon over six months ago remains in effect,” said this official, who spoke on the condition of anonymity to share internal planning.

At a recent appearance at Fort Bragg base in North Carolina, where Trump presented a unit citation to the Special Operations soldiers who killed Islamic State leader Abu Bakr al-Baghdadi, the president made it clear that he wanted to bring troops home from Afghanistan and Syria and focus on preparing for war with a major power such as China, a senior defense official said.

The showdown over Afghanistan will be a test for Milley, a blunt career soldier who seemed to easily connect with Trump, prompting the president to select him as chairman in 2018 over the advice of then-Defense Secretary Jim Mattis. Although Milley has been able to maintain a relationship with the president more successfully than Esper did, there have been signs of strain.

Milley and Esper opposed invoking the Insurrection Act, as Trump had suggested, to deploy active-duty troops on America’s streets to quell protests prompted by the police killing of George Floyd in May. For months afterward, Trump trained his fury over the disagreement on Esper, administration officials said.

Milley and Esper also appeared with Trump in June outside the White House after authorities forcibly cleared protesters from Lafayette Square ahead of a photo opportunity for Trump in front of a church, but Milley peeled off from the group and later issued an unusual public apology for being at the scene.

More recently, Milley appeared to get in a public spat with O’Brien on leaving Afghanistan, dismissing O’Brien’s statement about a more rapid timeline than the official plan calls for as “speculation.” O’Brien hit back several days later. “When I’m speaking I’m speaking for the president and I think that’s what the Pentagon is moving out and doing,” O’Brien said.

Adding to speculation about an exit from Afghanistan was news Wednesday that Miller had appointed Douglas Macgregor, a retired Army colonel and Trump ally, as a senior adviser.

Macgregor, whose nomination to be the U.S. ambassador to Germany was derailed under scrutiny for his past comments about Muslims and Mexicans, has said in television interviews that Trump should disregard the advice of the Pentagon and withdraw remaining troops from Afghanistan, calling efforts to maintain stability there “futile.”

Joseph Kernan, a former Navy SEAL who this week was asked to leave his position as the Pentagon’s top intelligence officer earlier than expected, said he did not believe the personnel changes were tied to the debate over Afghanistan, or an effort to accelerate a drawdown. “I don’t think there’s a relationship between those two,” Kernan said.

“There were lots of deliberations on what was required in Afghanistan — large numbers all the way down to smaller numbers,” he said. “There was no definitive discussion that I’m aware of on what was going to be left.”

Milley’s handling of a potential rush of final decisions related to Afghanistan or the election will be crucial in the transition period, which security experts say can present particularly vulnerable moments when adversaries can seek to exploit leadership changes. Potentially most charged for Milley, who has emphasized that the armed forces’ commitment to the Constitution above all else, would be any attempt to pull the military into Trump’s attempts to assert an electoral win.

“The last thing you want in national security is gaps and short-term changes that bounce back and forth,” said Anthony Zinni, a retired Marine Corps general who oversaw U.S. Central Command. “You’re really jacking around the military if that happens.”

Retired Adm. James Stavridis, who served as supreme allied commander of NATO from 2009 to 2013, expressed confidence that Milley and the military leadership would “resolutely” stay out of politics and said they were standing by to work with President-elect Joe Biden’s transition teams to facilitate the turnover as soon as the Trump administration allows government agencies to do so.

“That it has not begun already is dangerous to our national security,” he said.

Alex Horton and Greg Miller contributed to this report.