The US President called for the death penalty for Sayfullo Saipov, the 29-year-old Uzbek immigrant accused of ploughing a truck down a New York City bike path, killing eight people, describing him as "a terrorist."
Saipov, who was hospitalised after he was shot by a police officer and arrested, told investigators he had been inspired by watching Isis videos and began plotting Tuesday's attack a year ago, according to a criminal complaint filed against him.
He confessed to authorities he made a trial run with a rental truck on 22 October to practice turning the vehicle and "stated that he felt good about what he had done" after the attack, the complaint said.
"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!" Mr Trump tweeted.
Presidents are typically advised to avoid commenting on active legal proceedings, as such comments can be used by defence lawyers to argue their clients cannot get a fair trial, The New York Times reports.
"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," Andrew C McCarthy, a former assistant US attorney said.
Saipov was charged with one count of providing material support and resources to a foreign terrorist organization, specifically Isis, and one count of violence and destruction of motor vehicles causing the deaths of eight people.
Manhattan acting US Attorney Joon Kim said the first count carries a maximum penalty of life in prison, while the second would make Saipov eligible for capital punishment if convicted, if the government chose to seek the death penalty. Additional or different charges could be brought later in an indictment, Mr Kim said.
The complaint said Saipov was particularly motivated by seeing a video in which Abu Bakr al-Baghdadi, the leader of Isis, exhorted Muslims in the United States and elsewhere to support the group's cause.
Investigators found thousands of Isis-related propaganda images and videos on a phone belonging to Saipov, including video clips showing Isis prisoners being beheaded, run over by a tank and shot in the face, the complaint said.
Earlier in the day, Mr Trump said he would be open to transferring Saipov to the military prison at Guantanamo Bay, Cuba, where other suspects including alleged 11 September plotters are held.
Mr Kim, the federal prosecutor, said there was nothing about charging Saipov in civilian court that would necessarily prevent him from later being declared an enemy combatant.
Additional reporting by Reuters
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies