Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

If the Uzbek immigrant charged with the deadly terrorist pickup-truck attack in New York City escapes the executioner, he may have President Donald Trump to thank for saving his life.

Trump’s repeated calls for Sayfullo Habibullaevic Saipov to get the death penalty could hobble prosecutors and undermine any attempt to execute him by allowing defense attorneys to argue that the potential jury pools have been tainted and the suspect can’t get a fair trial when the commander in chief is calling for his head, former federal prosecutors said Thursday.

“Prosecutors have to be very careful about what they say before a trial because an indictment is just an allegation and not proof of a crime,” Renato Mariotti, a former federal prosecutor in Chicago, told NBC News.

“Here, you have the president of the United States doing that, and the defense can argue that he has already told the juror this man is guilty and he can’t get a fair trial.”

Trump helped the terrorist with this tweet. Now prosecutors will have to spend time dealing with motions that the jury pool is tainted. https://t.co/YJk05aem6U — Renato Mariotti (@renato_mariotti) November 2, 2017

Joyce Vance, a former U.S. attorney for the Northern District of Alabama, agreed.

“The president has sort of decreed that he should get the death penalty,” Vance said. “Again we are bumping up against the idea that the president doesn’t get involved in individual prosecutions.”

“We are a rule of law country and we operate on the rule of law, not the whims of the president,” Vance added.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Rob Owen, a Northwestern University law professor and former assistant federal public defender who has represented people facing the death penalty, said Trump is giving Saipov's defense team a gift.

"The more publicity the president's comments receive, the more difficult it may eventually be to seat an unbiased jury to hear Mr. Saipov's case, because jurors might be influenced by having heard that the president has demanded a particular outcome in the case," Owen wrote in an email.

Former Chief Assistant U.S. Attorney Andrew McCarthy also weighed-in on Trump’s favorite social media site, saying he didn’t disagree that Saipov deserves to get the ultimate penalty. Still….

Mr. President, we all know he should get the death penalty. But when *you* say it, it makes it harder for DOJ to make that happen. https://t.co/m19gHTLg7R — Andrew C. McCarthy (@AndrewCMcCarthy) November 2, 2017

But Jennifer Rodgers, executive director of the Center for the Advancement of Public Integrity at Columbia Law School and a former federal prosecutor, said that while the president’s comments are “highly inappropriate,” she doubts it will derail the case.

“I don’t think the comments, made in the immediate aftermath of the incident at the time when the president did not know all the facts of the case, will justify dismissing the case against this guy,” she wrote in an email.

They also aren't likely to force the case to be moved out of New York City because Trump weighed-in on Twitter, which is a social media platform with a national audience, she said.

“Probably the judge will deny a motion to change venue and ask if the defense wants an instruction during voir dire that any comments by anyone, including the president, about the case, other than comments made inside the courtroom, should be disregarded,” Rodgers said.

Saipov, 29, was was hit with federal charges Wednesday in connection with the deadliest terrorist attack in New York City since Sept. 11, 2001. Eight people were killed and a dozen more were injured on Tuesday when he allegedly plowed a pickup into bicyclists and pedestrians in lower Manhattan.

The ex-prosecutors weighed-in after Trump doubled-down on his death penalty calls for Saipov in a pair of tweets and also said he would consider imprisoning him at the federal prison camp at Guantánamo Bay, Cuba.

NYC terrorist was happy as he asked to hang ISIS flag in his hospital room. He killed 8 people, badly injured 12. SHOULD GET DEATH PENALTY! — Donald J. Trump (@realDonaldTrump) November 2, 2017

...There is also something appropriate about keeping him in the home of the horrible crime he committed. Should move fast. DEATH PENALTY! — Donald J. Trump (@realDonaldTrump) November 2, 2017

That prompted Trump allies like Rep. Pete King, R-N.Y., to urge Trump to be more cautious.

“Yeah, obviously this is one of those situations where you have a president who’s a nonpolitician and a nonlawyer and is speaking from the gut,” King said on “Morning Joe.” “I think most Americans right now would say, ‘Yes, give him the electric chair, give him the gas chamber, give him the needle.’”

Still, King continued, “the president has to be careful on what he says.”

When Charles Manson was on trial in 1970, said King, President Richard M. Nixon called him “a killer and the trial wasn’t over yet and they were very concerned that it would cause a mistrial.”

Manson was eventually found guilty and sent to prison for life.

Asked about Trump's tweets, New York City Mayor Bill de Blasio said: "I'm not a someone who believes in the death penalty. I believe this is an individual who should rot in prison for the rest of his life."

Trump also reportedly called the U.S. criminal justice system “a laughingstock” after the terror attack, a crack that did not sit well with New York City Police Commissioner James O’Neill, who is helping to lead the Saipov investigation.

“In New York City, it’s definitely not a joke,” O’Neill said on "TODAY." “I get to work with our justice system every day.”

CORRECTION (Nov. 3, 7:10 a.m.): An earlier version of this article misstated the first name of a former U.S. attorney. It is Joyce Vance, not Joy.