NEW YORK — A 29-year-old man driving a rental truck plowed down people on a Manhattan bike path Tuesday in what authorities described as a terrorist attack that killed eight and injured 11 before the suspect was shot and arrested by police.

A sunny fall day along the Hudson River erupted in chaos just around the time students were getting out from nearby Stuyvesant High School, when a rented Home Depot truck turned on to the bike path along the West Side Highway.

Witnesses say the speeding truck struck unsuspecting bicyclists and pedestrians while onlookers screamed and scattered. The truck then veered left toward Chambers Street, where it collided with a small school bus, injuring two adults and two children inside, officials said.

Foreign ministries of Belgium and Argentina said five Argentines and a Belgian were among the victims. The Argentine nationals were part of a group of friends celebrating the 30th anniversary of their high school graduation, the Argentine Foreign Ministry said in a statement Tuesday.

Law enforcement officials, speaking on the condition of anonymity to discuss an open investigation, identified the suspect as Sayfullo Saipov, an Uzbek immigrant who had been living in Tampa.

The attack could intensify the political debate over immigration and security. President Trump has argued for much tougher screening of immigrants to prevent terrorism, and opponents of those policies have sought to block his efforts in the courts. Uzbekistan was not among the countries named in any version of the president’s travel ban, which largely targeted a number of majority-Muslim countries.

Trump responded to the attack on Twitter, saying it “looks like another attack by a very sick and deranged person.’’ He tweeted a short time later: “We must not allow ISIS to return, or enter, our country after defeating them in the Middle East and elsewhere. Enough!” ISIS is an acronym for the Islamic State.

On Tuesday night Trump said he was tightening immigrant screening, tweeting: “I have just ordered Homeland Security to step up our already Extreme Vetting Program. Being politically correct is fine, but not for this!”

There was no immediate indication that the attack had been directed by the Islamic State. However, the group has called on its supporters in Western countries to launch their own attacks, using anything at hand as weapons, including vehicles.

Inside the rental truck, investigators found a handwritten note in which Saipov had declared his allegiance to the Islamic State, according to officials.

Saipov is expected to survive, meaning investigators will likely have a chance to question him about his motive for the attack, but so far, they said, he appears to have been a “lone wolf’’ suspect – someone who acted alone after being inspired, but not directly instructed, by the Islamic State.

He had been living in Paterson, New Jersey before the attack, and rented the vehicle in that state before driving it into Manhattan, officials said.

The violence was terrifyingly similar to vehicle attacks carried out in Europe, where Islamic State supporters have used cars and trucks to strike pedestrians in crowded streets, a tactic that has been employed in France, Britain, Germany, Sweden and Spain.

“This certainly bears all the hallmarks of an ISIS-inspired or al-Qaeda-inspired attack,” said Rep. Adam B. Schiff (Calif.), the ranking Democrat on the House Intelligence Committee, whom the FBI briefed on the attack Tuesday evening. “We have to expect that as the capital of the caliphate has now fallen, there are going to be increasing efforts to show that they remain dangerous and lethal, and to expand the virtual caliphate.”

Antonio Valasquez, 28, said he saw the truck speed by as he left a restaurant and then heard a crash. “I didn’t really understand, you know, at first what was happening,” he said. Valasquez said he heard what appeared to be gunshots shortly after but couldn’t be sure. “I was running away.”

An officer from the 1st Precinct approached Saipov and shot him in the abdomen, police said. He has been taken to a hospital, but officials did not discuss his condition or location. The weapons he was brandishing turned out to be a pellet gun and a paintball gun, police said.

Rabbi Chaim Zaklos was picking up about half a dozen children from school to escort them to Hebrew school nearby when he encountered the scene. Police were pushing people away, and he could see abandoned bikes and what appeared to be uprooted trees nearby. “It was obvious something drastic was happening, so I just wanted to get the kids someplace safe,” said Zaklos, 35.

“This is a very painful day in our city,’’ New York City Mayor Bill de Blasio (D) said. “Based on the information we have at this moment, this was an act of terror, a particularly cowardly act of terror aimed at innocent civilians.”

Saipov moved to the United States from Uzbekistan about six years ago, said Dilnoza Abdusamatova, 24, who said Saipov stayed with her family in Cincinnati for his first two weeks in the country because their fathers were friends. Some officials said he arrived in 2010.

Abdusamatova said Saipov then moved to Florida to start a trucking company. Her family members think he got married about a year after arriving in the United States and may now have two children. Around that time, she said, he cut off contact with them.

“He stopped talking to us when he got married,” Abdusamatova said.

Saipov had lived in an apartment complex, Heritage at Tampa, near the Hillsborough River. On Tuesday evening, two plainclothes investigators were seen departing the community, having interviewed several residents and others in the surrounding neighborhood. The investigators declined to answer any questions.

“Four FBI agents came and told me he used to live here,” said Venessa Jones, who said she lives in an apartment above the one Saipov rented. Neighbors at the complex said they didn’t know Saipov.

Officials said they had no information to suggest that the attacker had any accomplices or that there was a further threat to the city.

Nevertheless, they said, extra police would be posted around the city as a precaution, particularly along the route of the Halloween Parade, a long-standing tradition in Manhattan’s Greenwich Village that attracts big crowds. Officials said sand trucks, police vehicles and other equipment would be used to deter any vehicle attacks at the parade.

A makeshift memorial is set up at the Houston Street entrance to the bike path in New York City where a man drove a rental truck Oct. 31, killing eight people and injuring several others. (Ricky Carioti/The Washington Post)
Flynn Coleman wipes away debris in front of a previous bicycle memorial, which is now being used for a memorial in the deadly Oct. 31 attack. (Ricky Carioti/The Washington Post)
Louie Vargas and his wife, Ingrid, look at a previous bicycle memorial now being used to mark the Oct. 31 truck attack. (Ricky Carioti/The Washington Post)
A man kneels down and prays at a bicycle memorial. (Ricky Carioti/The Washington Post)
Flowers are placed along the bike path where the attack took place. (Ricky Carioti/The Washington Post)
Bicyclists ride along the bike path. (Ricky Carioti/The Washington Post)
People cycle on the bike path in Lower Manhattan. (Ricky Carioti/The Washington Post)
Morning commuters and pedestrians maneuver through the closed intersection at Murray and West streets, crossing over the closed bike path where a man drove a rental truck for 20 blocks. (Ricky Carioti/The Washington Post)
The scene at Chambers Street and West Side Highway in New York City. (Ricky Carioti/The Washington Post)
Pedestrians walk past the closed bike path. (Ricky Carioti/The Washington Post)
Schoolchildren in a bus look out the windows as they pass a police barricade. (Ricky Carioti/The Washington Post)
Technicians look for evidence along the bike path where an Uzbek immigrant allegedly drove a rental truck, killing at least eight people. (Ricky Carioti/The Washington Post)
An evidence technician collects debris along the bike path. (Ricky Carioti/The Washington Post)
The rental truck used by a suspect is hauled away. (Ricky Carioti/The Washington Post)
Caroline Ventura looks down at flowers she laid for victims of the attack on the bike path. (Shannon Stapleton/Reuters)
Police officers guard the highway near the scene of the truck attack. (Ricky Carioti/The Washington Post)
Investigators inspect a truck following the attack in New York. (Don Emmert/AFP/Getty Images)
The suspected driver of the pickup truck runs along a road after the attack. (Social Media/Reuters)
Emergency crews attend the scene of an alleged shooting incident on West Street in Manhattan, New York, U.S., October 31 2017. REUTERS/Andrew Kelly (Andrew Kelly/Reuters)
Emergency personnel remove the body of a victim near the bike path. (Lane/Epa-Efe/Rex/Shutterstock)
Authorities respond near a damaged school bus in New York. (Bebeto Matthews/AP)
People gather near the scene of the attack on a bike path in Lower Manhattan. (Kena Betancur/Getty Images)
Authorities investigate the scene around a covered body along the bike path. (Bebeto Matthews/AP)
Pedestrians move off the street. (Shannon Stapleton/Reuters)
Emergency workers remove a victim’s body. (Szenes/Epa-Efe/Rex/Shutterstock)
Officers respond to a report of gunfire along West Street near the pedestrian bridge at Stuyvesant High School in Lower Manhattan. (Martin Speechley/AP)
Police officers respond after multiple people were struck by a truck. (Kena Betancur/Getty Images)
A girl reacts as police officers secure an area in New York. (Don Emmert/AFP/Getty Images)
Police secure the area at a bike path in Lower Manhattan. (Craig Ruttle/AP)
Police gather at the scene of the attack. (Andy Kiss/Getty Images)
Police guard the area after the attack. (Don Emmert/AFP/Getty Images)
A paramedic looks at a body covered by a white sheet along the bike path. (Bebeto Matthews/AP)
Sayfullo Saipov, the suspect in the New York City truck attack. (Handout/Reuters)
A woman is aided by first responders after suffering an injury on a bike path. (Brendan Mcdermid/Reuters)
Emergency workers transport an injured man. (Mark Lennihan/AP)
Children leave a school after the attack. (Shannon Stapleton/Reuters)
Police officers secure an area following the truck attack. (Don Emmert/AFP/Getty Images)
Police investigate the pickup truck thought to be used in the attack. (Andrew Kelly/Reuters)
Authorities investigate the area near a covered body on the bike path. (Bebeto Matthews/AP)
Police tape blocks off a bike lane after the attack. (Timothy Fadek/Bloomberg)
State police stand near the scene of the attack on West Street in Manhattan. (Andrew Kelly/Reuters)
Passersby and members of the media observe the scene. (Andres Kudacki/AP)
Authorities inspect the area near the bike path. (Don Emmert/AFP/Getty Images)
New York police officers stand guard during the 44rd annual Halloween Parade in New York, just hours after the attack in Lower Manhattan. (Angela Weiss/AFP/Getty Images)
Photo Gallery: A motorist drove onto a busy bicycle path near the World Trade Center memorial and struck several people, police and witnesses said.

The investigation is being led by the FBI with the assistance of the New York Police Department.

“We have recently seen attacks like this one throughout the world,’’ said acting homeland security secretary Elaine Duke. “DHS and its law enforcement partners remain vigilant and committed to safeguarding the American people.’’

The Argentine Foreign Ministry identified the five dead Argentine nationals as Hernán Diego Mendoza, Diego Enrique Angelini, Alejandro Damián Pagnucco, Ariel Erlij and Hernán Ferruchi. It added that a sixth member of the group, Martin Ludovico Marro, sustained injuries and is being hospitalized in the Presbyterian Hospital of Manhattan. He is in stable condition, the government said, citing medical officials.

The group of friends hailed from the city of Rosario, the largest city in the central province of Santa Fe. They graduated from the Instituto Politécnico, a technical high school in Rosario, in 1987.

The Argentine government expressed its “sincere condolences” and said the General Consulate remains in contact with police authorities, hospital staff and the victim’s relatives in Argentina.

“We accompany the families in this terrible moment of deep pain, which all Argentines share,” the government statement read.

Argentina’s president, Mauricio Macri, tweeted that he was “deeply moved by the tragic deaths” in New York. “We are available to the families of the Argentine victims,” he added.

Rosario’s local newspaper, La Capital, described the vacation to New York as the “trip of their dreams,” and reported that they were riding bicycles in Lower Manhattan before the attack.

The local newspaper’s headline read:  “A trip of camaraderie among friends from Rosario turns into tragedy.”

Barrett, Lowery, Siegel, and Schmidt reported from Washington. Philip Bump in New York, Jon Silman in Tampa, and Julie Tate, Ellen Nakashima, Jennifer Jenkins, Mark Berman in Washington contributed to this report.

Read more: