New York (CNN) A federal judge ruled Friday that prosecutors can seek the death penalty against a New York City terror suspect, despite a defense motion that cited tweets by President Trump advocating capital punishment in the case.

Sayfullo Saipov is the suspect in New York's deadliest terror incident since 9/11. Police said he drove a pickup truck down a bicycle path near the World Trade Center on Halloween 2017, leaving eight people dead and injuring many others.

"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!" Trump said on Twitter not long after the incident.

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

The defense motion argued Trump was trying the case in the court of public opinion, and so the Department of Justice would be unable to make an impartial decision on whether to seek the death penalty should Saipov be found guilty.

Read More