Deputy Attorney General Rod J. Rosenstein testifying Tuesday on Capitol Hill about the Justice Department budget. (Alex Brandon/AP)

President Trump put fresh pressure on the second-highest-ranking official at the Justice Department on Friday, raising concerns among the president’s critics that Rod J. Rosenstein could be in danger of being fired, while others argued that if he stays he should recuse himself from his role overseeing the special-counsel probe that has engulfed the White House.

“I am being investigated for firing the FBI Director by the man who told me to fire the FBI Director! Witch Hunt,” the president said on Twitter.

Rosenstein, the deputy attorney general, had written a memo castigating James B. Comey before Trump dismissed the FBI director — a memo that the White House at first said was critical to the decision, before Trump suggested it was irrelevant because his mind was already made up.

A career prosecutor who entered the administration with a reputation as a meticulous, nonpartisan lawyer, Rosenstein has been buffeted in his short time on the job by political storms — and now the extraordinary spectacle of being singled out on social media by the president.

Rosenstein, the former U.S. attorney in Maryland, was forced to take over supervision of the Russia investigation because Attorney General Jeff Sessions had recused himself.

A guide to the five major investigations of the Trump campaign’s possible ties to Russia

And it was Rosenstein who appointed Robert S. Mueller III as the special counsel to lead that investigation after Comey was fired.

With the revelation this week by The Washington Post that Trump was under investigation for possible attempted obstruction of justice, Rosenstein finds himself caught in an awkward pincer — stuck between the wrath of a president who could fire him and questions about his own future role supervising Mueller when he could become a witness in the special counsel’s probe.

Rosenstein could eventually be questioned by Mueller about his memo on Comey and what motivated Trump to ask him to write it.

Rosenstein, 52, has said little publicly, but a cryptic statement he released late Thursday captured some of the strain and frustration he is probably feeling about the numerous unauthorized leaks…