President Donald Trump appeared to confirm on Friday that he is under investigation for obstruction of justice, claiming that he is being investigated for firing FBI Director James Comey by the man who told him to do it.

It wasn’t clear whether the President was basing his tweet on direct knowledge that he is under investigation, or on reports this week that special counsel Robert Mueller is examining whether the President obstructed justice by firing Mr. Comey in May 2017 amid the ongoing Russia investigation.

Mr. Mueller was appointed as special counsel to investigate Russian involvement in the 2016 Presidential election and possible collusion by Trump campaign associates with the Russians, but there has been no indication that Mr. Mueller told Mr. Trump to fire Mr. Comey.

“I am being investigated for firing the FBI Director by the man who told me to fire the FBI Director! Witch Hunt,” the president wrote in his tweet.

In another tweet earlier on June 16, 2017, Mr. Trump writes, “After 7 months of investigations & committee hearings about my ‘collusion with the Russians,’ nobody has been able to show any proof. Sad!”

Deputy Attorney-General Rod Rosenstein submitted a widely circulated memo to the President in May 2017 raising concerns over Mr. Comey’s performance, but Mr. Trump later asserted that he had already made the decision himself to fire Mr. Comey.

The White House confirmed that Mr. Mueller was among the candidates Mr. Trump interviewed to replace Mr. Comey. A day later, Mr. Rosenstein appointed Mr. Mueller, who was at the helm of the FBI during the September 11 attacks, as special counsel.

The tweets on June 16, 2017 are the latest in a week of angry social media responses by the President over a report by The Washington Post that Mr. Mueller was looking into whether Mr. Trump obstructed justice.

In a series of statements on Twitter on June 15, 2017, Mr. Trump repeated his assertion that Mr. Mueller’s investigation into Russian interference in the 2016 campaign is a “WITCH HUNT” based on the “phony” premise of possible collusion between Russia and a cadre of Trump campaign associates.

The President complained the probe is unfair and wondered why his defeated Democratic opponent wasn’t getting the same scrutiny.

“Why is that Hillary Clintons family and Dems dealings with Russia are not looked at, but my non-dealings are?” he said.

“They made up a phony collusion with the Russians story, found zero proof, so now they go for obstruction of justice on the phony story. Nice,” Mr. Trump wrote in his first tweet. “You are witnessing the single greatest WITCH HUNT in American political history — led by some very bad and conflicted people! #MAGA.”

The Twitter attacks came as Vice-President Mike Pence hired a personal lawyer to represent him in the intensifying investigation. Mr. Pence’s office confirmed he had retained Richard Cullen, a former Virginia Attorney-General and U.S. attorney for the Eastern District of Virginia, to assist “in responding to inquiries” from Mr. Mueller.