WASHINGTON — The Justice Division’s high leaders listened in surprised silence this month: Considered one of their friends, they have been informed, had devised a plan with President Donald J. Trump to oust Jeffrey A. Rosen as appearing lawyer basic and wield the division’s energy to pressure Georgia state lawmakers to overturn its presidential election outcomes.

The unassuming lawyer who labored on the plan, Jeffrey Clark, had been devising methods to forged doubt on the election outcomes and to bolster Mr. Trump’s persevering with authorized battles and the strain on Georgia politicians. As a result of Mr. Rosen had refused the president’s entreaties to hold out these plans, Mr. Trump was about to determine whether or not to fireside Mr. Rosen and exchange him with Mr. Clark.

The division officers, convened on a convention name, then requested one another: What is going to you do if Mr. Rosen is dismissed?

The reply was unanimous. They might resign.

Their casual pact in the end helped persuade Mr. Trump to maintain Mr. Rosen in place, calculating {that a} furor over mass resignations on the high of the Justice Division would eclipse any consideration on his baseless accusations of voter fraud. Mr. Trump’s determination got here solely after Mr. Rosen and Mr. Clark made their competing instances to him in a weird White Home assembly that two officers in contrast with an episode of Mr. Trump’s actuality present “The Apprentice,” albeit one that might immediate a constitutional disaster.

The beforehand unknown chapter was the fruits of the president’s long-running effort to batter the Justice Division into advancing his private agenda. He additionally pressed Mr. Rosen to nominate particular counsels, together with one who would look into Dominion Voting Methods, a maker of election tools that Mr. Trump’s allies had falsely stated was working with Venezuela to flip votes from Mr. Trump to Joseph R. Biden Jr.

This account of the division’s remaining days below Mr. Trump’s management relies on interviews with 4 former Trump administration officers who requested to not be named due to worry of retaliation.

Mr. Clark stated that this account contained inaccuracies however didn’t specify, including that he couldn’t focus on any conversations with Mr. Trump or Justice Division legal professionals due to “the strictures of authorized privilege.” “Senior Justice Division legal professionals, not uncommonly, present authorized recommendation to the White Home as a part of our duties,” he stated. “All my official communications have been in keeping with legislation.”

Mr. Clark categorically denied that he devised any plan to oust Mr. Rosen, or to formulate suggestions for motion primarily based on factual inaccuracies gleaned from the web. “My apply is to depend on sworn testimony to evaluate disputed factual claims,” Mr. Clark stated. “There was a candid dialogue of choices and professionals and cons with the president. It’s unlucky that those that have been a part of a privileged authorized dialog would remark in public about such inner deliberations, whereas additionally distorting any discussions.”

Mr. Clark additionally famous that he was the lead signatory on a Justice Division request final month asking a federal decide to reject a lawsuit that sought to strain Vice President Mike Pence to overturn the outcomes of the election.

Mr. Trump declined to remark. An adviser stated that Mr. Trump has constantly argued that the justice system ought to examine “rampant election fraud that has plagued our system for years.”

The adviser added that “any assertion on the contrary is fake and being pushed by those that want to maintain the system damaged.” Mr. Clark agreed and stated that “authorized privileges” prevented him from divulging specifics concerning the dialog.

A Justice Division spokesman declined to remark, as did Mr. Rosen.

When Mr. Trump said on Dec. 14 that Legal professional Basic William P. Barr was leaving the division, some officers thought that he may enable Mr. Rosen a brief reprieve earlier than urgent him about voter fraud. In any case, Mr. Barr can be round for an additional week.

As an alternative, Mr. Trump summoned Mr. Rosen to the Oval Workplace the subsequent day. He needed the Justice Division to file authorized briefs supporting his allies’ lawsuits searching for to overturn his election loss. And he urged Mr. Rosen to nominate particular counsels to research not solely unfounded accusations of widespread voter fraud, but additionally Dominion, the voting machines agency.

(Dominion has sued the pro-Trump lawyer Sidney Powell, who inserted these accusations into 4 federal lawsuits about voter irregularities that have been all dismissed.)

Mr. Rosen refused. He maintained that he would make choices primarily based on the details and the legislation, and he reiterated what Mr. Barr had privately informed Mr. Trump: The division had investigated voting irregularities and located no proof of widespread fraud.

However Mr. Trump continued to press Mr. Rosen after the assembly — in cellphone calls and in particular person. He repeatedly stated that he didn’t perceive why the Justice Division had not discovered proof that supported conspiracy theories in regards to the election that a few of his private legal professionals had espoused. He declared that the division was not preventing onerous sufficient for him.

As Mr. Rosen and the deputy lawyer basic, Richard P. Donoghue, pushed again, they have been unaware that Mr. Clark had been launched to Mr. Trump by a Pennsylvania politician and had informed the president that he agreed that fraud had affected the election outcomes.

Mr. Trump shortly embraced Mr. Clark, who had been appointed the appearing head of the civil division in September and was additionally the pinnacle of the division’s environmental and pure assets division.

As December wore on, Mr. Clark talked about to Mr. Rosen and Mr. Donoghue that he spent quite a lot of time studying on the web — a remark that alarmed them as a result of they inferred that he believed the unfounded conspiracy idea that Mr. Trump had gained the election. Mr. Clark additionally informed them that he needed the division to carry a information convention asserting that it was investigating critical accusations of election fraud. Mr. Rosen and Mr. Donoghue rejected the proposal.

As Mr. Trump centered more and more on Georgia, a state he misplaced narrowly to Mr. Biden, he complained to Justice Division leaders that the U.S. lawyer in Atlanta, Byung J. Pak, was not looking for proof for false election claims pushed by Mr. Trump’s lawyer Rudolph W. Giuliani and others. Mr. Donoghue warned Mr. Pak that the president was now fixated on his workplace, and that it won’t be tenable for him to proceed to steer it, in line with two folks acquainted with the dialog.

That dialog and Mr. Trump’s efforts to pressure Georgia’s Republican secretary of state to “discover” him votes compelled Mr. Pak to abruptly resign this month.

Mr. Clark was additionally centered on Georgia. He drafted a letter that he needed Mr. Rosen to ship to Georgia state legislators that wrongly stated that the Justice Division was investigating accusations of voter fraud of their state, and that they need to transfer to void Mr. Biden’s win there.

Mr. Rosen and Mr. Donoghue once more rejected Mr. Clark’s proposal.

On New 12 months’s Eve, the trio met to debate Mr. Clark’s refusal to hew to the division’s conclusion that the election outcomes have been legitimate. Mr. Donoghue flatly informed Mr. Clark that what he was doing was fallacious. The subsequent day, Mr. Clark informed Mr. Rosen — who had mentored him whereas they labored collectively on the legislation agency Kirkland & Ellis — that he was going to debate his technique with the president early the subsequent week, simply earlier than Congress was set to certify Mr. Biden’s electoral victory.

Unbeknown to the appearing lawyer basic, Mr. Clark’s timeline moved up. He met with Mr. Trump over the weekend, then knowledgeable Mr. Rosen noon on Sunday that the president meant to switch him with Mr. Clark, who may then attempt to cease Congress from certifying the Electoral Faculty outcomes. He stated that Mr. Rosen may keep on as his deputy lawyer basic, leaving Mr. Rosen speechless.

Unwilling to step down with no battle, Mr. Rosen stated that he wanted to listen to straight from Mr. Trump and labored with the White Home counsel, Pat A. Cipollone, to convene a gathering for early that night.

Whilst Mr. Clark’s pronouncement was sinking in, gorgeous information broke out of Georgia: State officers had recorded an hourlong name, published by The Washington Post, throughout which Mr. Trump pressured them to fabricate sufficient votes to declare him the victor. Because the fallout from the recording ricocheted by way of Washington, the president’s determined bid to vary the result in Georgia got here into sharp focus.

Mr. Rosen and Mr. Donoghue pressed forward, informing Steven Engel, the pinnacle of the Justice Division’s workplace of authorized counsel, about Mr. Clark’s newest maneuver. Mr. Donoghue convened a late-afternoon name with the division’s remaining senior leaders, laying out Mr. Clark’s efforts to switch Mr. Rosen.

Mr. Rosen deliberate to quickly head to the White Home to debate his destiny, Mr. Donoghue informed the group. Ought to Mr. Rosen be fired, all of them agreed to resign en masse. For some, the plan dropped at thoughts the so-called Saturday Night time Bloodbath of the Nixon period, the place Legal professional Basic Elliot L. Richardson and his deputy resigned fairly than perform the president’s order to fireside the particular prosecutor investigating him.

The Clark plan, the officers concluded, would critically hurt the division, the federal government and the rule of legislation. For hours, they anxiously messaged and referred to as each other as they awaited Mr. Rosen’s destiny.

Round 6 p.m., Mr. Rosen, Mr. Donoghue and Mr. Clark met on the White Home with Mr. Trump, Mr. Cipollone, his deputy Patrick Philbin and different legal professionals. Mr. Trump had Mr. Rosen and Mr. Clark current their arguments to him.

Mr. Cipollone suggested the president to not hearth Mr. Rosen and he reiterated, as he had for days, that he didn’t advocate sending the letter to Georgia lawmakers. Mr. Engel suggested Mr. Trump that he and the division’s remaining high officers would resign if he fired Mr. Rosen, leaving Mr. Clark alone on the division.

Mr. Trump appeared considerably swayed by the concept firing Mr. Rosen would set off not solely chaos on the Justice Division, but additionally congressional investigations and probably recriminations from different Republicans and distract consideration from his efforts to overturn the election outcomes.

After almost three hours, Mr. Trump in the end determined that Mr. Clark’s plan would fail, and he allowed Mr. Rosen to remain.

Mr. Rosen and his deputies concluded that they had weathered the turmoil. As soon as Congress licensed Mr. Biden’s victory, there can be little for them to do till they left together with Mr. Trump in two weeks.

They started to exhale days later because the Electoral Faculty certification on the Capitol bought underway. After which they obtained phrase: The constructing had been breached.

Maggie Haberman contributed reporting from New York.