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 about the Russia investigation that have angered the president, according to several of his colleagues and friends.

“Americans should exercise caution before accepting as true any stories attributed to anonymous ‘officials,’ particularly when they do not identify the country — let alone the branch or agency of government — with which the alleged sources supposedly are affiliated,” Rosenstein said. “Americans should be skeptical about anonymous allegations.”

Jack Goldsmith, a Harvard University law professor and a senior Justice Department official in the George W. Bush administration, immediately tweeted, “And the Deputy Attorney General should have better judgment.”

Tim Maloney, a Maryland lawyer who has worked with Rosenstein, said he is going to handle the decision of whether to recuse himself in the oversight of the special counsel’s Russia investigation “by the book.”

“Knowing Rod, he’s on the phone, he’s going to consult established DOJ policy, and he’s going to review prior opinion examining what his proper role is,” Maloney said. “He is not going to allow Trump to bully him into recusing himself or not recusing himself.”

Rosenstein sees no reason at this point to recuse himself, the Justice Department said Friday. “As the deputy attorney general has said numerous times, if there comes a point when he needs to recuse, he will,” Justice Department spokesman Ian Prior said in a statement. “However, nothing has changed.”

But Rosenstein has privately told people at the Justice Department, as ABC News first reported, that he may need to step aside from his role supervising the special-counsel investigation, according to officials familiar with the conversations.

If Rosenstein were to recuse himself, the responsibility of overseeing the special counsel would fall to the department’s third-highest-ranking official, Rachel Lee Brand, who was confirmed a month ago to be associate attorney general.

If Trump ordered Brand to fire Mueller and she refused, the responsibility to oversee the special counsel would fall to Dana Boente, the U.S. attorney for the Eastern District of Virginia, according to a presidential executive order. Boente is serving as the acting head of the Justice Department’s national security division.

After Boente, the responsibility would fall to the U.S. attorney for the Eastern District of North Carolina and then the U.S. attorney for the Northern District of Texas.

“You begin to wonder if it is going to be a domino effect here where it is just one person after another,” said Andrew Graham, a longtime Maryland defense lawyer who worked with Rosenstein. “Someone is going to have to conduct this investigation.”

Sen. Dianne Feinstein (Calif.), the ranking Democrat on the Senate Judiciary Committee, said Friday that she is “increasingly concerned” that Trump will try to fire Rosenstein and Mueller.

“The message the president is sending through his tweets is that he believes the rule of law doesn’t apply to him and that anyone who thinks otherwise will be fired,” Feinstein said in a statement.

There is also a third scenario besides dismissal and recusal. Rosenstein could quit.

It is an option he has apparently considered in the recent past. Rosenstein threatened to resign after the White House cast him as a prime mover of the decision to fire Comey and suggested the president acted only on his recommendation, a person close to the White House, who spoke on the condition of anonymity because of the sensitivity of the matter, told The Post last month.