(CNN) He may be an imperfect messenger, but James Comey 's warning is still chilling.

The former FBI chief is calling out what he sees as an increasingly obvious and disturbing trend: The President of the United States, far from upholding the rule of law, frequently seeks to shape it for personal and political gain.

In just the last few days, President Donald Trump has jumped into active court cases, attacked legally supported investigations and put his own political goals ahead of judicial conventions that underpin the independent legal system.

He inserted himself into a military investigation of a US soldier accused of the pre-meditated murder of a Taliban bomb maker by vowing to examine the case. His move complicated a difficult, highly sensitive investigation that is being closely watched in Afghanistan and could even have implications down the road for the security of American soldiers serving in a dangerous environment.

On Tuesday, Trump offered public support to Michael Flynn ahead of a hearing in which the former national security adviser will learn whether he will go to prison for lying to the FBI.

Good luck today in court to General Michael Flynn. Will be interesting to see what he has to say, despite tremendous pressure being put on him, about Russian Collusion in our great and, obviously, highly successful political campaign. There was no Collusion!

Trump also fired off a weekend tweet accusing the FBI of breaking in to the office of Michael Cohen, his ex-lawyer who is headed to prison next year. The raid was carried out on a court endorsed warrant.

Remember, Michael Cohen only became a "Rat" after the FBI did something which was absolutely unthinkable & unheard of until the Witch Hunt was illegally started. They BROKE INTO AN ATTORNEY'S OFFICE! Why didn't they break into the DNC to get the Server, or Crooked's office? — Donald J. Trump (@realDonaldTrump) December 16, 2018

And last week, Trump raised doubts over the apolitical independence of the legal system by suggesting he could use a top Chinese executive awaiting extradition from Canada on fraud charges as a chip in his trade war.

His comment put Canada, who first arrested Huawei's Meng Wanzhou, in a tough diplomatic spot, raised questions about whether she would receive due process and could undermine US critiques of the way judicial systems in China and other totalitarian states are subordinate to politics.

But Trump's challenge to legal norms is not new.

In two years in office, Trump has built a mountain of tweets, remarks and actions that do not just test institutional restraints on presidential power but appear to undermine the constitutional norms he is sworn to uphold.

His willingness to use the weight of his office in such a way appears to be increasing the prospect of a constitutional imbroglio at a time when multiple areas of Trump's public, political and business life are under investigation.

And it risks lingering damage to the infrastructure of American justice and the public support that is essential for democratic and judicial institutions to retain legitimacy even after he has left office.

That possibility seems to lie behind Comey's concern.

"This is not about Republicans and Democrats. This is about what does it mean to be an American," Comey said after testifying on Capitol Hill Monday.

"We have to stop being numb to it, whether you're Republican or Democrat, stand on your feet, overcome your shame and say something."

No let up

Trump started to jolt America's judicial and legal system as soon as he moved into the White House, castigating judges who slowed his agenda and piling pressure on the Justice Department over the Russia probe.

There's been no let up since.

The President's unconventional relationship with the law goes far beyond the numerous legal challenges to his presidency, transition and campaign and the unusual number of associates who have fallen foul of prosecutors.

He's sued and been sued countless times, often using the legal system and bankruptcy courts as a tactical tool as a real estate tycoon.

Trump has so far not been found guilty of any wrongdoing by Mueller or prosecutors elsewhere. He denies he has done anything wrong.

But it is extraordinary that he has been indirectly implicated by federal prosecutors in New York in cooperating with Cohen to pay hush money to women who accused him of affairs, in violation of campaign finance laws.

Unprecedented for at least 40 years

Many presidents have had frustrations with the legal system and criticized court rulings and irksome judges. Tensions between branches of government are inherent in the US political system.

But no modern president has racked up a record like Trump, who has risked the integrity of the justice system of which he is the titular head for apparently personal and political reasons.

"I think that at least going back 40 years there is no comparison that you can make in terms of degree," said Rudy Mehrbani, senior counsel at the non-partisan Brennan Center for Justice at New York University School of Law.

"He really doesn't respect the judiciary and the rule of law as we expect and need Presidents to. ... He just weighs in for what I think are clear partisan political purposes."

The President has publicly appeared to dangle the possibility of a pardon in front of his former campaign chairman Paul Manafort who faces years in jail.

In tirades more typical of a despot, he has demanded his political foes be investigated by the Justice Department. He beams when crowds chant "lock her up" in reference to Hillary Clinton at his rallies.

His pardons of Arizona Sheriff Joe Arpaio and conservative polemicist Dinesh D'Souza were criticized as pure partisan plays to please his base.

In November, he slammed a judge on the US Court of Appeals for the Ninth Circuit as an "Obama judge" after he contravened the administration's asylum policy. In an exceedingly rare move, Chief Justice John Roberts issued a statement contradicting the President's remarks.

Trump responded by proposing the break up of the Ninth Circuit.

In 2017, Trump accused judges of thwarting the fight against terrorism by overturning his executive orders on immigration.

Trump didn't even wait to become President to slam the judiciary: in 2016, he singled out American-born Judge Gonzalo Curiel over the Trump University civil suit, arguing his Mexican heritage meant he could not deliver a fair verdict.

Presidential pressure

Trump's challenge to the rule of law has not been confined to the judiciary.

For two years he has leaned hard on the Justice Department. His beef with former Attorney General Jeff Sessions was that he recused himself over the Russia probe in accordance with departmental norms.

Then there has been the incessant effort to demean Mueller and the FBI in an apparent campaign to devalue any eventual critical conclusions out of the Russia investigation. According to Comey, the President asked him to go easy on Flynn. The former FBI chief's firing triggered the appointment of Mueller and an investigation into whether Trump obstructed justice.

Trump has often given the impression that he views the Justice Department as owing loyalty to him rather than the rule of law.

"So often, the President would say here's what I want to do and here's how I want to do it," former Secretary of State Rex Tillerson said in one of his first public appearances since leaving the administration.

"And I would have to say to him, 'Mr. President, I understand what you want to do, but you can't do it that way. It violates the law,' " Tillerson said.

Trump supporters often argue that his critics take his tweets and comments too seriously. And they reject any criticism by Comey, who many conservatives accuse of giving Clinton a pass on her email server.

Democrats are still fuming at the former FBI chief because they believe he handed the White House to Trump by reopening the Clinton probe days before the election.

Trump backers, who chose someone to shake up what they saw as a corrupt political establishment either do not perceive a threat to the rule of law or really don't care that much. Their perceptions of Trump's behavior are also filtered through the conservative media machine. And the President's approval ratings of 80% and higher among Republicans offer him a safety net with his political base.

But there is an increasing expectation of a legal reckoning in Washington as Mueller appears to be aiming directly at the President as he approaches the end of his investigation.

That means that Trump has likely yet to pose his gravest test to the legal system and the rule of law.