President Trump claimed in a tweet Monday that he has the “absolute right” to pardon himself, although the matter has never been decided by the courts, and incorrectly asserted that the appointment of a special counsel is “unconstitutional.”

​”​As has been stated by numerous legal scholars, I have the absolute right to PARDON myself, but why would I do that when I have done nothing wrong?​,” he said in the posting. “In the meantime, the never ending Witch Hunt, led by 13 very Angry and Conflicted Democrats (& others) continues into the mid-terms!​”​

Then he turned to Robert Mueller’s investigation into Russian meddling and whether Trump obstructed justice during the probe.

​”The appointment of the Special Councel is totally UNCONSTITUTIONAL! Despite that, we play the game because I, unlike the Democrats, have done nothing wrong!,” he wrote about 30 minutes later, misspelling counsel.

The Supreme Court ruled in a 7-1 decision in June 1988 that the attorney general can appoint an “independent counsel” to investigate and prosecute federal officials.

Justice Antonin Scalia, who died in 2016, dissented.

Deputy Attorney General Rod Rosenstein, who was appointed by Trump, named Mueller as special counsel in May 2017 a week after the president fired FBI Director James Comey, who had been heading up the probe.

Rosenstein made the appointment because Attorney General Jeff Sessions recused himself from the investigation.

Trump’s pardon tweet was building off Rudy Giuliani’s appearances on Sunday’s news shows where he said the president “probably” has the power to pardon himself but has no intention of doing so. ​

“He has no intention of pardoning himself, but he probably does [have the power to],” Giuliani ​said on ABC’s ”This Week.”

In a letter sent by Trump’s lawyers to Mueller in January, they argued that the president has broad powers that include the ability to “terminate the inquiry, or even exercise his power to pardon,” the New York Times reported Saturday.

Sen. Chuck Grassley, the chairman of the Senate Judiciary Committee, said Giuliani is giving Trump bad legal advice.

“If I were president of the United States and I had a lawyer that said I could pardon myself, I think I would hire a new lawyer,” the Iowa Republican told CNN.

The legal question over a president self-pardoning has never been taken up by the courts because no chief executive has ever attempted to do it.

Legal experts who talked to The Post about the issue were split on whether Trump could pardon himself.

James Pfiffner, a public policy professor at George Mason University, said the principles contained in the Federalist Papers of “no one is above the rule of law” and “no man should be the judge in a case that affects him personally” would prohibit the president from pardoning himself.

But Samuel Morison, a former Justice Department lawyer, said Trump’s “probably right.”

Because the president’s power is contained in the Constitution, it is part of the system. So when he issues a pardon, it’s “part of the structure of the Constitution.”

Michigan State law professor Brian Kalt said it’s all conjecture until a court case tests the matter.

“For every person who confidently asserts that he can do it, there is another person asserting just as confidently that he can’t,” Kalt said. “Without a real case, both of those people are wrong.”