President Trump backed off the idea Thursday morning of sending the New York terrorism suspect to the military prison at Guantanamo Bay, Cuba, and instead called for a regular federal trial and the death penalty.

"Would love to send the NYC terrorist to Guantanamo but statistically that process takes much longer than going through the Federal system," Trump tweeted in the morning.

In a follow-up post, Trump added: "There is also something appropriate about keeping him in the home of the horrible crime he committed. Should move fast. DEATH PENALTY!"

Trump also said in a tweet late Wednesday that the alleged terrorist who killed eight people in New York should get the death penalty.

"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!" the president tweeted.

Numerous legal analysts said that, given his position in the government, Trump should not be pre-judging the outcome of any trial; defense lawyers will no doubt seize on the president's comments to claim the trial cannot be fair.

"This is called potentially tainting jury pool & could impact alleged perpetrator's ability to secure fair trial. SMH," tweeted national security lawyer Mark Zaid.

Trump first tweet came hours after details emerged in a criminal complaint that the suspect allegedly told investigators he “felt good” about carrying out the attack, and also asked to display flags of the Islamic State terrorist group in his hospital room.

On Tuesday, Sayfullo Saipov, a 29-year-old from Uzbekistan, allegedly rammed a truck into a crowded bike path near the World Trade Center Memorial, killing eight and injuring a dozen.

Trump responded to the attack by pledging to increase vetting of immigrants entering the U.S. He also promised Wednesday to end the visa program that allowed the suspect into the country.

Trump also said he was considering sending Saipov to the U.S. military prison at Guantanamo Bay, but indicated Thursday that the process would be too complex and time-consuming.

Contributing: David Jackson