WASHINGTON — President Trump acknowledged publicly for the first time on Friday that he was under investigation in the expanding inquiry into Russian influence in the election, and he appeared to attack the integrity of the Justice Department official in charge of leading it.
In an early-morning tweet, the president declared that he was “being investigated” for his decision to fire James B. Comey, the former F.B.I. director. And he seemed to accuse Rod J. Rosenstein, the deputy attorney general, of leading a “witch hunt.”
The tweet was the first explicit concession by the president that Robert S. Mueller III, the special counsel for the Russia inquiry, had begun examining whether Mr. Trump’s firing of Mr. Comey last month was an attempt to obstruct the investigation.
And Mr. Trump’s apparent reference to Mr. Rosenstein, who oversees the Russia investigation because Attorney General Jeff Sessions recused himself from it, came just hours after an oddly worded statement from Mr. Rosenstein complaining about leaks in the case.
In the statement, Mr. Rosenstein wrote that “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.”
He added: “Americans should be skeptical about anonymous allegations. The Department of Justice has a long-established policy to neither confirm nor deny such allegations.”
Mr. Rosenstein’s statement followed two articles by The Washington Post that cited unnamed officials, one saying that Mr. Mueller’s investigation had widened to include whether Mr. Trump committed obstruction of justice, the other that it was looking at financial transactions involving Jared Kushner, the president’s adviser and son-in-law. After the statement, The Post updated the Kushner article so that its first sourcing reference was to “U.S. officials.”
The highly unusual statement by the deputy attorney general raised the question of whether Mr. Trump or some other White House official had asked him to publicly discredit the reports. Part of the revelations surrounding the Russia investigation and the firing of Mr. Comey has been that Mr. Trump repeatedly pushed top intelligence officials to say in public that Mr. Trump was not personally under investigation and that there was no evidence of collusion between his campaign and Russia in its interference in the 2016 election.
But there was some evidence that Mr. Rosenstein’s motivation may instead have been his own mounting frustration at seeing details of the law enforcement investigation appear nearly daily in the news media.
A Justice Department official, speaking on the condition of anonymity to discuss internal matters, said that no one had asked Mr. Rosenstein to make the statement and that he acted on his own.
Still, the statement, followed by Mr. Trump’s tweet, demonstrated the pressure on the deputy attorney general.
This week, a friend of Mr. Trump’s said the president was considering firing Mr. Mueller — a task that would be complicated by Justice Department regulations, which say that only the attorney general may fire a special counsel and only if there is good cause. Mr. Rosenstein is acting as the attorney general in the inquiry because Mr. Sessions recused himself from investigations that touch on the 2016 presidential campaigns.
According to people briefed on his thinking, while Mr. Trump has left open the possibility of dismissing Mr. Mueller, his anger has been mostly trained on Mr. Sessions and Mr. Rosenstein. The president blames Mr. Rosenstein for appointing Mr. Mueller in the first place, and he faults Mr. Sessions for his earlier recusal from Russia-related issues.
But the people briefed on the president’s thinking said Mr. Trump also knows that firing Mr. Rosenstein would be politically dangerous.
Responding to Mr. Trump’s statement on Twitter, Senator Dianne Feinstein of California, the ranking Democrat on the Judiciary Committee, said she was “growing increasingly concerned” that Mr. Trump might attempt to fire both Mr. Mueller and Mr. Rosenstein.
“If the president thinks he can fire Deputy Attorney General Rosenstein and replace him with someone who will shut down the investigation, he’s in for a rude awakening,” she said in a statement. “Even his staunchest supporters will balk at such a blatant effort to subvert the law.”
Separately, the apparent expansion of Mr. Mueller’s investigation into whether Mr. Trump obstructed justice, including by firing Mr. Comey, has raised the question of whether Mr. Rosenstein, as a witness to and participant in the events in 2017 that culminated in that ouster, may have to also recuse himself.
If Mr. Rosenstein recuses himself from overseeing the special counsel investigation or were to resign or be fired by Mr. Trump — acting attorney general duties for the inquiry would fall to the department’s No. 3 official, Associate Attorney General Rachel Brand.
Ms. Brand has never served as a prosecutor. She advised the Bush Justice Department on selecting judicial nominees, and she served as a Republican appointee on the Privacy and Civil Liberties Oversight Board.
“As the deputy attorney general has said numerous times, if there comes a point when he needs to recuse, he will,” said Ian Prior, a Justice Department spokesman. “However, nothing has changed.”
On Friday morning, Mr. Rosenstein made a public appearance at the Justice Department, presenting awards to dozens of department employees. He did not take questions from reporters.
In testimony on Tuesday, Mr. Rosenstein said that he had seen no reason to remove Mr. Mueller, whom he appointed last month, and vowed to “defend the integrity” of the special counsel investigation.
Mr. Trump’s tweet appeared to be inaccurate or oversimplified in two respects. The presient has said he had already made his decision to fire Mr. Comey before Mr. Rosenstein wrote a memo recommending Mr. Comey’s dismissal. He then wrote a memo laying out that line of criticism, not explicitly recommend removing Mr. Comey.
The president’s latest tweet came after a series of others in which Mr. Trump continued to complain about the Russia investigations swirling around him, and just hours after members of Congress from both parties gathered at a baseball field to call for unity after the shooting at a Republican baseball practice this week.
In two other early-morning tweets, the president insisted that no one had found any “proof” that he colluded with Russians to meddle with the 2016 presidential elections, and he once again assailed the news media.
Mr. Trump’s claim to have 100 million social media followers is an exaggeration based on adding his followers on Twitter, Facebook and Instagram — many of whom are most likely the same people.
But however many people actually follow him on social media, the president clearly views them as a refuge from the barrage of newspaper headlines and cable news stories about the Russia investigations.
Faced with a Russia investigation that appears to be broadening, Mr. Trump appears eager to use Twitter to undermine the credibility of the inquiry and to convince his supporters that they do not need to worry.
In a third tweet Friday morning, Mr. Trump repeated his assertion that the investigations were a “phony Witch Hunt” and bragged that the nation’s economy was improving quickly.