President Trump declared late Wednesday the man suspected to be behind the deadly New York City terrorist attack this week should receive 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!," Trump tweeted.

Trump's tweet immediately elicited complaints from legal experts who were concerned Trump's say in the matter might hurt the legal system's ability to make the death penalty happen.

Trump remarked earlier in the day during a Cabinet meeting at the White House that the U.S. justice system is "a joke" and "a laughingstock." With his attorney general, Jeff Sessions, in the room, Trump said it's "no wonder so much of this stuff takes place" and called for "quicker" and "far greater" punishment for terror suspects.

Trump's tweet Wednesday evening was in reference to a criminal complaint filed Wednesday which said the suspect, 29-year-old Sayfullo Habibullaevic Saipov, asked if could display the Islamic State flag in his hospital room because he "felt good" about what he had done.

The attack in Manhattan on Tuesday involved a Home Depot truck that was driven into a bike path. After crashing his truck into a school bus, the suspect, carrying a pellet gun and paint gun, was shot in the abdomen by a New York Police Department officer and brought to a local hospital for surgery.

Federal prosecutors charged Saipov on Wednesday with providing material support to the Islamic State and for violence and destruction of motor vehicles, which lead to eight deaths and a dozen more injured.

Trump has responded to the terror attack in his home city in an eclectic manner. On Tuesday he tweeted that he was committed to keeping ISIS out of the U.S. That was followed by a tweet in which he shared his "thoughts, condolences and prayers to the victims and families" impacted by the attack.

Trump on Wednesday said he would ask Congress to end the diversity visa lottery program, after it was reported that Saipov entered the country in 2010 under that program.

He even floated the idea of sending Saipov to Guantanamo Bay in Cuba, where the U.S. has a U.S. military detention facility.

Some Republican hawks, Sens. Lindsey Graham and John McCain, said Saipov should be held as an enemy combatant after the attack. Graham lamented that now Saipov is “lawyered up” and said that plea bargaining may be the only way to retrieve more intelligence.

“Plea bargaining is a bad way to gather intelligence — not required under the law of war,” Graham, R-S.C., said. “Given the facts, any first-year law school student could obtain a conviction in court. I am more concerned about intelligence gathering to help win a war. That is a process which takes time — time which is now lost.”