US President Donald Trump has called for the death penalty for an Uzbek immigrant accused of ploughing a truck down a New York City bike path, killing eight people, describing the man as a "terrorist."
Sayfullo Saipov (29), who was hospitalised after he was shot by a police officer and arrested, told investigators he had been inspired by watching Islamic State videos and began planning Tuesday's attack a year ago, according to a criminal complaint filed against him.
"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 on Wednesday.
Saipov was charged with one count of providing material support and resources to a foreign terrorist organisation, specifically Islamic State, 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, Kim said.
Vehicle assaults similar to the New York attack took place in Spain in August and in France and Germany last year, claiming dozens of lives. Saipov confessed to authorities that he made a trial run with a rental truck on October 22 to practice turning the vehicle and "stated that he felt good about what he had done" after the attack, the complaint said.
The 10-page charging document said Saipov waived his rights to remain silent and avoid self-incrimination in agreeing to speak to investigators without an attorney present from his bed at Bellevue Hospital Center in Manhattan.
The complaint said Saipov had requested permission to display the flag of the Islamic State militant group in his hospital room.
It said he was particularly motivated by seeing a video in which Abu Bakr al-Baghdadi, who led the campaign by Islamic State - also known as ISIS - to seize territory for a self-proclaimed caliphate within Iraq and Syria, 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 cellphone belonging to Saipov, including video clips showing ISIS prisoners being beheaded, run over by a tank and shot in the face, the complaint said.
The Federal Bureau of Investigation said it had located another Uzbek man, Mukhammadzoir Kadirov (32) wanted for questioning as a person of interest in the attack.
US law enforcement officials, speaking on condition of anonymity because the investigation was ongoing, told Reuters that Saipov had been in contact with Kadirov and another person of interest in the investigation, though they did not elaborate.
Tuesday's assault was the deadliest in New York City since Sept. 11, 2001, when suicide hijackers crashed two jetliners into the World Trade Center, killing more than 2,600 people.
Of those killed, five were Argentine tourists, who were among a group of friends visiting New York to celebrate the 30th anniversary of their high school graduation, one was a Belgian citizen, one was a New York resident and one lived in New Jersey.
Saipov allegedly used a pickup truck rented from a New Jersey Home Depot store to run down pedestrians and cyclists along a 20-block stretch of the bike path that runs along the Hudson River before slamming into a school bus.
According to authorities, he then exited his vehicle shouting "Allahu Akbar" - Arabic for "God is greatest" - and brandishing what turned out to be a paint-ball gun and a pellet gun before a police officer shot him in the abdomen.
Saipov lived in Paterson, New Jersey, a one-time industrial hub about 40km northwest of lower Manhattan.
Saipov, seated in a wheelchair, appeared for a brief hearing in Manhattan federal court Wednesday evening before Magistrate Judge Barbara Moses, appointed public defense attorney David Patton to represent him. Saipov did not ask for bail and was remanded to federal custody. It was not immediately clear where he would be held.
Earlier in the day, Trump said he would be open to transferring Saipov to the military prison at Guantanamo Bay, Cuba, where other suspects including alleged Sept. 11 plotters are held.
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.