NEW YORK — The suspected terrorist in the Manhattan truck attack told investigators he “felt good” about carrying out the crime that left eight dead and a dozen injured, and also asked to display flags of the ISIS terrorist group in his hospital room, according to a criminal complaint filed Wednesday.

The latest revelations in the Halloween attack come as investigators seek a second person for questioning and piece together the weeks leading up to the attack, in which Sayfullo Saipov, a 29-year-old truck driver from Uzbekistan, rammed a rented Home Depot truck into a crowded walkway and bike path.

Saipov had meticulously planned the attack for weeks and left a note in his vehicle proclaiming that the "Islamic State would endure forever," law enforcement authorities said. Saipov was shot by police immediately after the attack but is expected to survive.

In a hospital bed interview with authorities, Saipov “requested to display ISIS’s flag in his hospital room and stated that he felt good about what he had done,” the complaint stated.

Saipov was charged in a two-count criminal complaint filed in Manhattan federal court with providing material support and resources to a designated foreign terrorist organization – ISIS— and violence and destruction of motor vehicles.

Saipov had two cell phones and a stun gun in the truck, according to statements in the criminal complaint filed by FBI Special Agent Amber Tyree.

After crashing the truck into a school bus, Saipov yelled “Allahu Akbar” — the Arabic words for God is Great, the complaint alleges.

Waiving his legal right to remain silent, Saipov told investigators during an interview at Bellevue Hospital that he was inspired to carry out an attack in the U.S. by ISIS videos he watched on his cell phone and began planning the attack approximately one year ago, the complaint said. Roughly two months ago he “decided to use a truck in order to inflict maximum damage against civilians,” the complaint said.

He was particularly motivated by a video in which ISIS leader Abu Bakr al-Baghdadi questioned what Muslims in the U.S. were doing to avenge the killings of Muslims in Iraq, the complaint said.

Eight people were killed and 12 injured in the attack that left bodies and smashed bicycles strewn along the Hudson River Greenway bike path.

Saipov rented the truck from the Home Depot in Passaic, N.J. on Oct. 22 “so he could practice making turns” with the vehicle before the attack. He chose Oct. 31 for the actual attack date “because he believed there would be more civilians on the street for the holiday,” the complaint alleged.

“Saipov planned to use the truck to strike pedestrians in the vicinity of the West Side Highway and then proceed to the Brooklyn Bridge to continue to strike pedestrians,” the complaint charged. He “wanted to kill as many people as he could,” and also “wanted to display ISIS flags in the front and back of the truck during the attack, but decided against it because he did not want to draw attention to himself,” the complaint alleged.

Also Wednesday, the FBI said it is seeking another man in connection with the attack. The man was identified in an FBI posting as Mukhammadzoir Kadirov. It's unclear what relationship Kadirov has with Saipov.

Police said the investigation was still in the early stages, but that it was clear Saipov had clearly planned the attack for weeks, including scouting the site beforehand.

"He appears to have followed almost exactly to a 'T' the instruction that ISIS has put out on social media on how to carry out some attack," John Miller, New York Police deputy commissioner, told reporters. "It appears that he has been planning it for a number of weeks."

Saipov was carrying a paintball gun and a pellet gun when he got out of the truck after the crash. He was unable to reach a bag of knives that was also inside, the complaint said.

Investigators obtained warrants to search both cellphones, which Saipov acknowledged belonged to him. One of the cellphones contained approximately 90 videos that appeared to be “ISIS-related propaganda,” the complaint charged. The videos included one of ISIS fighters killing a prisoner by running him over with a tank and another with what appeared to be ISIS fighters shooting a prisoner in the face, the complaint said. Yet another video showed a beheading, the complaint stated.

The second cell phone contained an Internet search history for the Home Depot store in Passaic on Oct. 4, an Oct. 15 search for Halloween in New York City, and an Oct. 18 search for truck rentals, the complaint said.

Miller said Saipov left a note in the truck, which had been rented less than an hour earlier in New Jersey, that was in Arabic and contained both symbols and words.

"The gist of the note was that the Islamic State would endure forever," Miller said.

Gov. Andrew Cuomo said Wednesday that the suspect had been "radicalized domestically" on behalf of the extremist organization.

Miller said Saipov was “never a subject” of any investigation by either the FBI or the NYPD. However, Saipov is believed to have had “some connectivity” to others who were the subjects of FBI and NYPD terror investigations, Miller said.

“This is not about Islam,” Miller said of the attack and continuing investigation after reporters asked whether investigators were checking mosques and other places connected to Saipov.

In Paterson, N.J., FBI agents hauled a trash bag out of Saipov's apartment, which the father of three shared with his family. He had recently moved to the area, which is home to a large Muslim population.

In Washington, President Trump called the suspect an “animal.” At a gathering of his Cabinet, Trump told reporters he would ask Congress to “immediately” begin work to terminate the Diversity Immigrant Visa Program, which he says was used by the alleged attacker to enter the U.S.

Trump earlier tweeted about the 20-year-old visa program, which he blamed on Sen. Minority Leader Chuck Schumer, D-N.Y., although it was part of a bipartisan bill on immigration.

In response to a question shouted by a reporter, Trump also said he would consider sending the suspect to the detainment facility at Guantanamo.

Cuomo criticized the president on Wednesday for trying to politicize the attack, saying the president's tweets were "not helpful" and "not factual."

"You play into the hands of the terrorists to the extent that you disrupt, divide and frighten people in this society," Cuomo said. "The tone now should be the exact opposite, by all officials on all levels."

The attack Tuesday afternoon began with the driver ramming the truck into bicycle riders along the path before colliding with a school bus near the World Trade Center memorial.

Witnesses told police the attacker yelled, “Allahu Akbar!” — “God is great” in Arabic — as he got out of the truck, AP reported, citing an official who was not authorized to discuss the case publicly and spoke on condition of anonymity.

Asked about that at a Tuesday news conference, New York City Police Commissioner James O’Neill replied: “Yeah. He did make a statement when he exited the vehicle.” He said the statement and the method of attack led police to conclude it was a terrorist act.

Among the dead were five men from Argentina who were in New York City to celebrate the 30th anniversary of their graduation from high school. Twelve people suffered serious but non-life threatening injuries.

Argentina’s foreign ministry named five of the victims, all men from the central city of Rosario, as Hernán Diego Mendoza, Diego Enrique Angelini, Alejandro Damián Pagnucco, Ariel Erlij and Hernán Ferruchi.

It said a sixth man, Martin Ludovico Marro, was recovering at the Presbyterian Hospital of Manhattan, where he is out of danger.

One of the dead was from Belgium, the country's foreign ministry said. Didier Reynders, the Belgian deputy prime minister and foreign affairs minister, told the Belga news agency the woman, from the city of Roulers, was visiting New York with her sister and mother. He said three Belgians were injured.

New York's political and law enforcement leaders said security is being beefed up in New York, particularly for Sunday's New York Marathon.

NYPD Chief of Department Carlos Gomez said enhanced security measures will include additional sand-filled dump trucks and blocker vehicles to cut off access to some streets along the marathon route.

He said police officials have “more than doubled” the number of rooftop spotter teams assigned to marathon security. Additional heavy weapons teams have been assigned to the race, which is scheduled to feature an estimated 51,000 runners, Gomez said. NYPD plainclothes officers will also mingle with the crowds, he said. “It will be a safe event,” he said.

Leaders around the world condemned the attack.

A tweet from the office of British Prime Minister Theresa May, whose country has been the victim of a series of deadly terror attacks this year, said: "Appalled by this cowardly attack, my thoughts are with all affected. Together we will defeat the evil of terrorism. UK stands with #NYC."

Donald Tusk, a European Union leader, added: "Another sickening but futile attempt to terrorise the people of #NYC and the free world. Europe stands by America."

Doug Stanglin reported from McLean, Va., Kevin McCoy reported from New York City. Contributing: Associated Press