Deputy Attorney General Rod Rosenstein has suddenly found himself in the middle of Washington's biggest political firestorm, and there are growing signs that he may not be able to avoid being consumed by it.

Rosenstein is the man responsible for overseeing special counsel Robert Mueller’s investigation into possible collusion between the Trump campaign and the Russian government. That’s because Attorney General Jeff Sessions — Rosenstein’s boss — recused himself from the probe after it became clear he’d provided false and misleading testimony to Congress about his own contacts with Russia.

That leaves Rosenstein walking a tightrope. On one hand, he seems committed to protecting the investigation from conservatives inside and outside Congress who believe it’s biased against the president and have been urging Trump to fire the special counsel.

But at the same time, Rosenstein can’t go so far in defending the probe that President Trump — who has called the investigation a “witch hunt” — fires him, as that would pave the way for Trump to potentially replace him with someone more willing to fire Mueller or otherwise thwart the investigation.

This is important, because Mueller has to run major investigative decisions past the deputy attorney general. A Rosenstein replacement could simply refuse to approve any of Mueller’s requests, effectively slowing the whole investigation to a crawl, or even fire Mueller outright if he felt there was a reason to do so. Rosenstein, however, has made it clear that at this point, he sees no reason to fire Mueller.

This seems to have irked Trump. He recently told some of his advisers that he thinks Rosenstein is “a Democrat” (even though he is actually a lifelong Republican) — possibly suggesting that he is thinking about firing the deputy attorney general.

All of which leads to one startling conclusion about Rosenstein: The future of the Mueller probe — and possibly even Trump’s presidency — is intricately linked with how well the nation’s second-highest law enforcement official performs this delicate balancing act.

Rosenstein has to keep Trump and the Justice Department happy. It’s not easy.

Rosenstein’s performance during a congressional hearing last week revealed how he’s trying to navigate this tricky situation.

Here’s what happened: On the night of December 12 — mere hours before Rosenstein would testify at a House Judiciary Committee hearing — the Justice Department showed reporters some anti-Trump texts. The messages were from two FBI officials, Peter Strzok and Lisa Page, who had corresponded throughout the 2016 presidential election.

Strzok — a former top FBI counterintelligence official who was on Mueller’s investigative team — texted Page that Trump was an “idiot.” He also wanted Clinton to defeat Trump in the election — in another message, he wrote: "God Hillary should win 100,000,000 — 0.”

There was also a text that seemingly implied Strzok and Page were working on an “insurance policy” in case Trump won the election. But the Wall Street Journal reported on December 18 that Strzok’s text was really about the need to investigate possible Trump-Russia ties. Mueller removed Strzok from his staff in July, and the Strzok-Page exchanges are subject to an internal investigation by the Justice Department. Still, some conservatives in and out of government think these texts show that the Mueller probe is biased against the president.

It’s unclear if Rosenstein authorized the release of the texts, but some legal analysts thought the DOJ made the messages public the night before Rosenstein’s big hearing to curry favor with the anti-Mueller crowd on the House Judiciary Committee.

"It's appalling behavior by the department," Matthew Miller, a former spokesperson for the Justice Department in the Obama administration, told Business Insider about the release of the texts. "This is an ongoing investigation in which these employees have due-process rights, and the political leadership at DOJ has thrown them to the wolves so Rosenstein can get credit from House Republicans at his hearing."

Rosenstein defended the release of the texts during the hearing, saying: "We consulted with the inspector general to determine that he had no objection to releasing the material,” in response to a question about the texts by Rep. Jamie Raskin (D-MD). “If he had, we would not have released it,” Rosenstein said.

But he also defended Mueller in that same session. Jerrold Nadler (D-NY), the committee’s ranking member, asked Rosenstein the most highly anticipated question of the session: “If you were ordered today to fire Mr. Mueller, what would you do?”

“If there were good cause, I would act. If there were no good cause, I would not,” Rosenstein replied. He then went on to defend Mueller personally, saying, “It would've been difficult to find anyone more qualified for this job.”

These exchanges show that Rosenstein was trying to stand up for the probe, while still appeasing Trump and his allies. Benjamin Wittes, an expert on national security law at the Brookings Institution, wrote on the Lawfare blog that Rosenstein may pay a price for doing both.

“Rosenstein here has, at a minimum, contributed to [the political] circus — at the expense of his own employees,” he wrote after the hearing. “The DOJ and FBI workforces will not forget that. Nor should they.”

Those 24 hours last week encapsulated Rosenstein’s political two-step. One minute he’s defending the release of texts that serve as ammunition for Mueller critics and Trump allies to lambast the investigation; the next, he’s defending Mueller from criticism by those same anti-Mueller conservatives and Trump allies — and putting his own job at risk.

Keeping both sides happy, however, allows Rosenstein to say he’s supporting his staff while also backing Trump. The deputy attorney general is playing a deft game, and those who have worked with him before are confident that he can pull it off.

“What you have in Rod is somebody that is battle-tested,” Julie Myers Wood, a prosecutor and former colleague of Rosenstein’s, told me in an interview. “I can’t think of anyone that is more prepared to handle this situation than him.”

Rosenstein is an apolitical man caught in a very political moment

Despite these recent controversies, Rosenstein has long been considered an apolitical straight shooter by those who’ve worked with him. “He has a directness about him — there’s no bullshit,” Philip Heymann, Rosenstein’s former professor at Harvard Law School and later his colleague, told me. “He says what he thinks, but he’s always fair.”

President George W. Bush appointed Rosenstein as the US attorney for Maryland in 2005. President Barack Obama later kept him on, making Rosenstein only one of three US attorneys — out of a total of 93 — retained by the new administration. Rosenstein officially joined the Trump administration in April as deputy attorney general after receiving broad bipartisan support in his confirmation vote.

But Rosenstein found himself in the middle of a major political controversy just two weeks into his new job. On May 9, he co-authored a letter with Sessions making the case that Trump should fire then-FBI Director James Comey because of how he had handled the results of the agency’s Clinton investigation.

“Over the past year,” Rosenstein wrote, “the FBI’s reputation and credibility have suffered substantial damage, and it has affected the entire Department of Justice.”

He added: “I cannot defend the director’s handling of the conclusion of the investigation of Secretary Clinton’s emails, and I do not understand his refusal to accept the nearly universal judgment that he was mistaken.”

Trump fired Comey later that day, citing the Sessions-Rosenstein letter as his reason. Pro-Trump Republicans and conservative media applauded the decision to remove Comey, but Democrats were furious. And some of that fury extended to Rosenstein himself.

Sen. Mark Warner (D-VA) told NPR shortly after the Comey firing that he had “lost any confidence I might have had” in Rosenstein, whose “first official action was putting his name on that letter, basically making what appeared to be bogus reasons [for] firing the FBI director.”

Those who know Rosenstein say he recommended firing Comey not because he wanted to please Trump, but rather because he believed Comey hurt the FBI’s reputation. “He’s guided by justice, not by politics,” Steve Levin, a former colleague of Rosenstein’s in Maryland, told me in an interview.

A week later, Rosenstein named Mueller as the special counsel, authorizing him to look into possible Trump-Russia ties as well as “any matters that arose or may arise from the investigation.”

It now seemed that Rosenstein wasn’t in Trump’s pocket. Trump himself was confused where Rosenstein’s true loyalties lay, tweeting on June 16, “I am being investigated for firing the FBI Director by the man who told me to fire the FBI Director! Witch Hunt.”

Firing Rosenstein could hamstring the Trump-Russia probe

Rosenstein somehow managed to navigate the Comey firing drama deftly, pleasing Trump just enough to keep his job without abandoning his principles. Whether he’ll be able to do that again this time around remains to be seen.

And a lot more is riding on his ability to pull it off this time. That’s because Rosenstein is now Mueller’s boss. He can approve or deny Mueller’s requests to investigate or indict someone.

So far, it doesn’t appear that Rosenstein has stopped Mueller from pursuing the investigation the way he sees fit, and he’s made every indication that he intends to continue to let Muller proceed with his investigation.

Trump could change all of that if he decided to put pressure on Rosenstein to fire Mueller. Rosenstein could carry out Trump’s request, but those who know him believe he wouldn’t. “I have no doubt that if the president ordered Rod to fire Mueller, absent good cause, Rod would refuse that order,” Levin told me.

But if Rosenstein did fire Mueller, the investigation might not be completely undermined, as charges against four Trump associates have already been filed and prosecutors are likely to continue to follow leads from the beginning of the investigation in June 2016.

Trump, however, has another option: He could instead fire Rosenstein and replace him with someone friendlier to the Trump administration and more willing to constrain Mueller. That could be even more detrimental to the Mueller probe. Asha Rangappa, a legal expert at Yale's Jackson Institute for Global Affairs, wrote in a post for the Just Security blog that a new deputy attorney general could effectively cripple the Mueller investigation by rejecting Mueller’s requests to investigate more people, obtain new evidence, or pursue charges against additional people, for instance.

Trump has recently signaled his growing distrust of Rosenstein, reportedly telling his advisers that Rosenstein is “a Democrat” and a threat to his presidency. This has led to growing speculation that he may be considering dismissing Rosenstein after all.

But Rosenstein’s defenders think he’s still playing the game correctly so far. “The fact that both sides are criticizing him,” Wood told me, “probably shows that he’s doing something right.”