Paul Callan is a CNN legal analyst, a former New York homicide prosecutor and currently is counsel at the New York law firm of Edelman & Edelman PC , focusing on wrongful conviction and civil rights cases. Follow him on Twitter @paulcallan . The opinions expressed in this commentary are his own.

(CNN) It's bad enough that President Trump called his own country's justice system a laughingstock. What may be even worse is that his remarks may have given a terror suspect who allegedly killed eight people an argument to avoid the death penalty.

On Tuesday, the President reacted with his customary incendiary rhetoric to the murderous rampage on a bike and pedestrian pathway bordering the Hudson River.

Sayfullo Saipov, a 29-year-old immigrant from Uzbekistan, is alleged to have driven a rented truck on the path and deliberately ramming into cyclists and pedestrians -- leaving eight people dead and more than a dozen hurt. A note found near the rented truck claimed that the act was committed in the name of ISIS, authorities said.

The killing spree only ended after he crashed into a school bus and was shot in the abdomen by New York City Police Officer Ryan Nash. Saipov, who survived Nash's shot, may now have an argument to avoid the death penalty due to reckless and intemperate remarks by President Trump regarding his case.

Many Americans would probably agree with the President's vitriolic blasts when he referred to those who commit terroristic acts as "animals" in need of "far quicker and greater punishment..."

A president's proper role is not to inflame the passions and fears of the angry crowd with name-calling that could get a prosecutor held in contempt of court and the conviction of a dangerous criminal reversed. On the contrary, given the stellar record of the American court system in bringing terrorists to justice, the president should be reassuring the public rather than stirring a hornet's nest of fear and hatred.

Since 9/11, in more than 600 cases of alleged terrorism or plots to commit terroristic acts, the US law enforcement authorities Trump frequently claims to support, have done just that.

Justice Department statistics demonstrate a conviction rate of 100% in cases involving a variety of claims related to ISIS, with an average sentence of 14.5 years. The conviction rate in all terrorism cases since 9/11 is approximately 87%, with an average sentence of 14 years. One expert quoted in the New York Times said sentences for terrorism-related crimes are among the highest in the world -- and may trail only China in that regard.

In Saipov's case we saw the seasoned professionals in law enforcement and the criminal justice system move into action at breakneck speed. They swiftly apprehended and charged the criminal suspect, and have continued to investigate the possibility of a wider plot involving co-conspirators. Much of this task had been completed by Wednesday, the day after the attack, when two criminal charges -- one which is punishable by death and the other by life in prison -- were filed against Saipov in a New York federal court.

While the suspect was being apprehended and charged, the President began indiscriminately firing accusations at not only the suspect but also the criminal justice system which had so efficiently apprehended and charged him.

During a Cabinet meeting Wednesday, the day after the attacks, the President called for "quick" and "strong" justice for terror suspects, observing that it is not surprising that terror attacks happen because the way the United States punishes terrorists is "a laughingstock." Later he told reporters: "We also have to come up with punishment that's far quicker and far greater than the punishment these animals are getting right now... They'll go through court for years. And at the end, they'll be -- who knows what happens."

Given the statistics indicating harsh punishments are generally the rule in terrorism cases, the President can put himself at the top of the "who doesn't know what happens" list.

With these comments, the President was recklessly undermining public confidence in the criminal justice system while inflaming the baser and darker instincts of an already fearful citizenry. His "animal" reference and the call for "far quicker" and "greater punishment" appears to be a thinly veiled call for swift and painful punishment as an act of vengeance.

And let's face it, even in the world of Trump's "politically correct" enemies, animals don't get trials. They are hunted, shot or euthanized. Perhaps even the vengeful President, missing the implication of his metaphor, would permit a brief trial even though he describes the suspect as an animal.

The President also suggested that Saipov should be transferred to the US military prison facility at Guantanamo but later withdrew that argument. By this time, he had presumably taken the unusual step of consulting with one of his many lawyers about the situation at Guantanamo.

They would surely have advised him that a transfer to Guantanamo for Saipov was probably illegal and might delay the suspect's trial for as long as 16 years as it has for five of the original 9/11 conspirators who are still awaiting a military trial there.

For future reference, President Trump and some of his conservative allies in Congress who call for the transfer of domestic terrorists to "Gitmo" as "enemy combatants" should consult with one of their favorite websites, Breitbart , where they will find a comprehensive list of statistics regarding the abysmal job that "Gitmo" has done in dispensing the "swift punishment" the President seeks.

Perhaps most distressingly, Trump's Twitter call for the death penalty in Saipov's case may backfire, preventing the death penalty from ever being imposed. Presidents almost never publicly comment on pending criminal jury trials for fear that defense attorneys will claim that the jury pool has been poisoned by the publicity surrounding the presidential expression of opinion.

Finally, and most importantly, Saipov's attorneys will be able to assert that the President's pretrial suggestion, on multiple occasions, that Saipov deserves the death penalty will deny Saipov his right to a fair and unbiased internal review of his case by the Justice Department's Capital Case Unit and by the attorney general himself, as required in all federal death penalty cases under the rules and regulations of the department.

What looks to be a potentially ironclad death penalty case given the motive, premeditation, multiple victims, as well as the utter cruel and senseless brutality of the murders, has the real potential of being completely undermined as a result of the President's inappropriate expression of opinion regarding the suspect's guilt and the imposition of the death penalty prior to trial.

The President should know better since he did the same thing in the Sgt. Bowe Bergdahl case , which may also be overturned on appeal as a result of the President's pretrial expression of opinions about it.

Follow CNN Opinion Join us on Twitter and Facebook

The only thing that might make the US justice system truly a laughingstock is if the President continues to try to improperly influence it. On Thursday the President lamented that he cannot get involved in pushing for a criminal investigation of his defeated rival. "The saddest thing is that because I'm the President of the United States, I am not supposed to be involved with the Justice Department," Trump said. "I am not supposed to be involved with the FBI."

And he is not supposed to be involved in how a terrorism suspect is prosecuted and -- if convicted -- sentenced. Future problems in the nation's appellate courts and possibly in the jury selection process are likely to be caused by President Trump's intemperate, inappropriate and reckless comments regarding the case against Sayfullo Saipov. If such presidential behavior continues, it will not be a joke but a national tragedy, potentially undermining the war on terror.