Set aside, for a moment, Donald Trump’s wholly unsubstantiated allegation that then-President Obama tapped his phones before the elections. Ignore that it’s been denied, on the record, by the man who just stepped down as the nation’s top spy. And ignore that FBI chief Jim Comey wants to go public with a formal denial that would effectively mean accusing the president he serves of lying.

Let's focus on something much scarier. Trump’s weekend tweetstorm shows that he has a dangerous misunderstanding of how the US legal system works — and a false belief that an elected leader could simply order the wiretap of another politician. Trump made clear during the campaign that he sees the Justice Department as an extension of the White House that tailors its investigations and prosecutions to a president’s whims. With that kind of worldview, it’s easy to see how a man as paranoid as Trump could come to believe that Obama personally ordered the wiretaps.

Trump’s invocation of Watergate in one of the tweets is instructive, though not in the way the president means. In the years after that scandal, Congress established an elaborate system of checks and balances specifically designed to prevent a president from being able to do what Trump is now alleging.

Under US law, presidents cannot direct the FBI or other intelligence agencies to eavesdrop on the calls, or read the emails, of an American citizen without a warrant authorized by a specialized surveillance court. That request would come from the FBI, not the White House, and would only be granted if the court had reason to suspect possible wrongdoing. Obama no more could have ordered the FBI to tap Trump’s phones than he could have ordered the FBI to search Trump’s home or office.

“One possible reading of the tweets is that the president is ignorant of the way surveillance law actually works, and he imagines that a president has more power than he really does,” said Matthew Waxman, a law professor at Columbia University who held an array of high-level national security positions during the Bush administration. “Assuming [a president] tries to do so through the government departments he controls, getting a wiretap is very hard, and merely requesting one himself would set off alarm bells.”

As a thought experiment, let’s set aside any questions about Obama’s role and assume for a second that Trump is correct and that he has been under government surveillance. That would raise a separate set of problems for the new president. Trump would only have had his phones tapped if federal investigators and prosecutors had reason to believe he or one of his close aides might have committed a crime.

Trump sees the Justice Department as an extension of the White House that tailors its investigations and prosecutions to a president’s whims

It’s important to stress that there’s no evidence that Trump himself is in government crosshairs. It’s also important to note that the FBI and other US intelligence agencies are probing ties between the Trump campaign and the Russian government, a simmering legal and political scandal that brought down former National Security Adviser Michael Flynn and is now threatening the future of Attorney General Jeff Sessions.

Those probes could explode into an even bigger scandal, or they could eventually turn out to be much ado about (relatively) little. Either way, Trump’s behavior during and since the election makes one thing disturbingly clear: He has little understanding of the limits on a president’s powers. And that, for a man who publicly admires strongmen like Vladimir Putin, is the most worrying part of this entire firestorm.

Candidate Trump didn’t understand legal norms. President Trump doesn’t, either

The particulars of Trump’s weekend tweets were certainly new — even at his angriest, Trump hadn’t previously derided Obama as “sick” or accused him of breaking the law —but they’re actually part of a broader pattern of public comments that show a fundamental misunderstanding of the relationship between the White House, the Justice Department, and the FBI.

Think back to this exchange from the final debate between Trump and Hillary Clinton, whom the then-GOP nominee accused of breaking the law by using a private email server:

TRUMP: I'll tell you what. I didn't think I'd say this, and I'm going to say it, and hate to say it: If I win, I'm going to instruct the attorney general to get a special prosecutor to look into your situation because there's never been so many lies, so much deception … a very expensive process, so we're going to get a special prosecutor because people have been, their lives have been destroyed for doing one-fifth of what you've done. And it's a disgrace, and honestly, you ought to be ashamed. CLINTON: Let me just talk about emails, because everything he just said is absolutely false. But I'm not surprised. … It's just awfully good that someone with the temperament of Donald Trump is not in charge of the law of our country. DT: Because you'd be in jail.

Read those words carefully. Trump wasn’t describing what would happen if existing norms were followed and a prosecutor independently decided to charge Clinton with a crime, took her to court, and won the case. He was instead promising to appoint a special prosecutor — regardless of what evidence did or did not exist — and warning Clinton that he’d throw her in jail if he were president.

As my colleague Zack Beauchamp noted at the time, threatening to jail political opponents “is how democratic norms die.”

“He is outright saying that he would imprison Hillary Clinton in office (if he could),” Beauchamp wrote. “That would be a politically motivated prosecution — retribution for daring to run against Trump and attack him during the campaign.”

Trump’s about-face after the election — in which he said he wouldn’t push to prosecute Clinton over the server — was equally startling because Trump was again misunderstanding the proper role of the president in criminal justice decision-making. Deciding to prosecute Clinton isn’t the president’s call, but choosing not to go after her isn’t his call either. Those decisions are supposed to be made by the FBI and the Justice Department without regard to the political preferences of the White House.

There’s a simple reason for that: Recent US history is replete with examples of what can go wrong when a president turns the government’s surveillance powers against his political opponents.

Trump isn’t Nixon, but his view of unbounded presidential power is scarily similar

In the 1960s and ’70s, Americans were startled to discover that a succession of US presidents had ordered the FBI and CIA to illegally tap the phones and bug the rooms of Americans ranging from high-profile political leaders such as Dr. Martin Luther King Jr. to students protesting against the Vietnam War.

The opening paragraph of a blockbuster New York Times investigation from December 1974 gives you a sense of the era:

The Central Intelligence Agency, directly violating its charter, conducted a massive, illegal domestic intelligence operation during the Nixon Administration against the antiwar movement and other dissident groups in the United States, according to well‐placed government sources.

The agency, author Seymour Hersh reported, had amassed intelligence files on more than 10,000 American citizens.

Nixon was no stranger to illegal wiretaps — he’d previously approved monitoring the communications of four reporters and 13 government officials as part of a leak investigation — but he wasn’t the only president to send US law enforcement authorities after political figures. In October 1963, shortly before President John F. Kennedy’s assassination, then-Attorney General Robert Kennedy approved an FBI request to tap King’s phones and put bugs in his hotel rooms. The surveillance wasn't revealed until years later.

Wiretapping a phone without a warrant had been illegal since 1968, when Congress codified legislation designed to put strict rules in place to govern what the government could, or could not, do to investigate or stop crime. A decade later, lawmakers went further and added a new step for cases that involve communications between Americans living in the US and possible accomplices overseas.

The law, which is still in force, requires law enforcement agencies to get a special warrant from a secretive body called the Foreign Intelligence Surveillance Court, more commonly known as the FISA Court. That’s the court that would have signed off on any efforts to intercept communications between Trump Tower and Moscow.

Here, again, is where Trump’s recent tweets show a misunderstanding of basic aspects of the US criminal justice system. Obama couldn’t order such surveillance on his own; any request would originate with the FBI and then need the formal approval of the FISA Court. The court grants most law enforcement requests, but not all of them. It's not clear if Trump’s tweets indicate that he has become aware of an actual FISA request or was just shooting from the hip (or, more accurately, his phone).

And that’s where things truly get perilous for Trump. We know, from a variety of news reports, that the law enforcement and intelligence agencies have intercepted calls and other communications showing that members of the Trump campaign were in frequent contact with senior Russian intelligence officials. The FBI and other agencies continue to probe those interactions as part of a broader investigation into the Trump camp’s ties to the Russian government.

Those contacts, and Trump aides’ repeated lies about them, have led to a raging political feeding frenzy that brought about Flynn’s resignation and has prompted calls for Sessions to either step down — he’s already recused himself from the Russia probe — or appoint a special prosecutor.

All of which is to say that Trump may be right that US authorities tried to monitor his communications before Inauguration Day, but that wouldn’t be at Obama’s direction, and it wouldn’t be for political purposes. It would be because there are real and lingering questions about Trump and Russia — and about whether close aides to a major party presidential candidate worked with a hostile foreign power to sway an election. Trump is right that there is a major scandal looming just over the horizon. He’s wrong about which one it is.