President Trump tweeted late Wednesday that New York City terror attack suspect Sayfullo Saipov "SHOULD GET 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! — Donald J. Trump (@realDonaldTrump) November 2, 2017

Saipov appeared in court Wednesday in a wheelchair with his hands and feet shackled. Federal prosecutors have charged him with two terrorism counts.

Earlier Wednesday, Mr. Trump called Saipov an "animal" and said the criminal justice system is a "joke" and a "laughing stock" in its prosecution of terror attack suspects. He also appeared to indicate Saipov could be sent to Guantanamo Bay detention facility, but White House spokeswoman Sarah Huckabee Sanders said Mr. Trump "supports, or would support that, but he wasn't necessarily advocating for it."

While New York doesn't have the death penalty, it's still an option for federal prosecutors in the Saipov case, CBS News justice reporter Paula Reid reports.

Get Breaking News Delivered to Your Inbox

Investigators say Saipov on Tuesday drove a rented truck along a Manhattan bicycle path, mowing down pedestrians and cyclists until the truck collided with a school bus at a nearby intersection. Eight people were killed and 12 were injured.

After the collision, Saipov allegedly exited the truck and yelled "Allah Akbar" -- Arabic for God is great. He was shot by a police officer shortly afterward and was taken to a local hospital.

New York City attack suspect Sayfullo Habibullaevic Saipov shown in court Wed., Nov. 1, 2017. Jane Rosenberg

According to the criminal complaint, Saipov had been planning the attack for months and chose to carry it out on Halloween because he believed there would be more people outside. He also told investigators he believed the attack was a success -- and he asked to fly the ISIS flag in his hospital room.

Federal prosecutors say Saipov was "consumed by hate and a twisted ideology."

Mr. Trump, a native of New York City, has been outspoken about Tuesday's attack. In a series of tweets Tuesday night, he called Saipov a "sick and deranged person" and then wrote "we must not allow ISIS to return." In a later tweet, he called for an "Extreme Vetting Program."

In NYC, looks like another attack by a very sick and deranged person. Law enforcement is following this closely. NOT IN THE U.S.A.! — Donald J. Trump (@realDonaldTrump) October 31, 2017

We must not allow ISIS to return, or enter, our country after defeating them in the Middle East and elsewhere. Enough! — Donald J. Trump (@realDonaldTrump) October 31, 2017

My thoughts, condolences and prayers to the victims and families of the New York City terrorist attack. God and your country are with you! — Donald J. Trump (@realDonaldTrump) October 31, 2017

I have just ordered Homeland Security to step up our already Extreme Vetting Program. Being politically correct is fine, but not for this! — Donald J. Trump (@realDonaldTrump) November 1, 2017

On Wednesday, Mr. Trump called for an end to the Diversity Visa Lottery Program, the federal program through which Saipov entered the U.S. He blamed the program on New York Democratic Sen. Chuck Schumer, who was not yet in the Senate when it was adopted, and called it a "Chuck Schumer beauty." In fact, Schumer advocated to end the program as part of an immigration reform bill in 2013.

We are fighting hard for Merit Based immigration, no more Democrat Lottery Systems. We must get MUCH tougher (and smarter). @foxandfriends — Donald J. Trump (@realDonaldTrump) November 1, 2017

"Senator Chuck Schumer helping to import Europes problems" said Col.Tony Shaffer. We will stop this craziness! @foxandfriends — Donald J. Trump (@realDonaldTrump) November 1, 2017

The terrorist came into our country through what is called the "Diversity Visa Lottery Program," a Chuck Schumer beauty. I want merit based. — Donald J. Trump (@realDonaldTrump) November 1, 2017

Sen. Chris Coons, D-Delaware, told CBS News' Elaine Quijano on Wednesday that he is "concerned" that Mr. Trump's immediate response was to "go on the attack."

"I frankly wish the president would focus on things that would bring us together and things that would make us safer," Coons said.

Coons said Mr. Trump's comments about the criminal justice system were not "constructive."

Presidents are usually advised to stay away from speaking about ongoing cases because defense lawyers can argue it will influence a jury. In fact, lawyers for Bowe Bergdahl, who pleaded guilty in October to desertion and endangering the troops who were sent to search for him, have argued for a lighter sentence in light of Mr. Trump calling him a "traitor" on the campaign trail.