NEW YORK — A man described by authorities as a terrorist drove a rented pickup down a crowded bicycle path in Lower Manhattan on Tuesday afternoon, killing at least eight people, police said — the first deaths from terrorism in New York since the World Trade Center attacks Sept. 11, 2001.

Two law enforcement sources close to the investigation identified the suspect as 29-year-old Sayfullo Saipov, a native of Uzbekistan who moved to the U.S. in 2010.

The trail of destruction extended for nearly a mile, with crushed bicycles and clothing scattered along the popular path. The rampage also injured nearly a dozen people.

It came to an end when the truck crashed into a school bus and the assailant ran into the street, waving a pellet gun and a paintball gun before being shot by a police officer and taken into custody.

Saipov shouted "Allahu akbar," which is Arabic for "God is great," before being arrested, the law enforcement sources said.

The New York Police Department said early Tuesday evening that the suspect had been transported to a hospital and was in surgery.

Calling the attack "a tragedy of the greatest magnitude," New York Police Commissioner James O'Neill said at an afternoon news conference it was clearly terrorism.

President Donald Trump took to Twitter to address the attack, writing: "In NYC, looks like another attack by a very sick and deranged person. Law enforcement is following this closely. NOT IN THE U.S.A.!"

Saipov was a legal U.S. resident, law enforcement sources said.

Court records from Missouri show a man with the same name and age was issued a ticket in Platte County for "improper brakes" on a commercial vehicle in December 2015. A warrant later was issued for his arrest when he failed to turn up for court.

Saipov's homeland, the former Soviet republic of Uzbekistan, is not considered a major hotbed for terrorism. But several terrorist groups — including the Islamic Movement of Uzbekistan, al-Qaida, Islamic State and the Islamic Jihad Union — have supporters there, according to the U.S. State Department.

In a 2015 case in Brooklyn, five men from Uzbekistan and one from neighboring Kazakhstan were charged by federal prosecutors with providing material support to Islamic State.

As night fell Tuesday, the investigation turned to New Jersey. Police blocked off a street in the city of Paterson, where Saipov had lived in an apartment. Investigators also visited a Passaic County Home Depot, where he rented the truck, according to multiple law enforcement sources.

The attack occurred just after 3 p.m. along the normally gridlocked West Side Highway, a large thoroughfare that runs along the western edge of Manhattan by the Hudson River. The skyline above is dominated by the Freedom Tower, which sits just blocks away from where the attack ended.

The school day was just ending at many nearby schools.

Rabbi Chaim Zaklos, 35, who leads the Chabad of Battery Park City in the Tribeca neighborhood, was organizing an afternoon pickup of his students.

"I knew something massive happened," he said.

Zaklos watched as police swarmed the wreckage of the Home Depot rental truck. He was sheltering his students inside the school until the scene was declared safe.

"This is insane," he said as paramedics attended to a man clutching a backpack on a stretcher.

Trucks have become a common weapon for terrorists in recent years.

At least 173 people have been killed and more than 700 wounded in 17 ramming attacks around the world in the last three years, according to a recent report by the U.S. Transportation Security Administration.

In July 2016, as thousands of people crammed into the streets of Nice, France, for a Bastille Day celebration, another assailant influenced by Islamic State drove a 19-ton cargo truck into a crowd, leaving 86 dead and 434 injured.

Then in December, a man with ties to Islamic State drove a 27-ton truck into a Christmas market in Berlin, killing 12 people and injuring 56 others.

Three months later, a man drove his car into pedestrians on London's Westminster Bridge, killing four and injuring dozens more, before jumping out and fatally stabbing a police officer and being shot dead by other officers.

And in June, a van plowed into pedestrians on London Bridge before attackers leaped from the vehicle and began stabbing patrons in a nearby nightlife area. Eight people were killed and dozens injured.

Two months later, Spain suffered its worst terrorist attack in more than a decade when a van plowed into a crowd in Barcelona, killing 14 people and injuring dozens.

New York has been largely spared from terrorism since nearly 3,000 people were killed in the Sept. 11, 2001, attacks.

The most recent violence from terrorism there came in September 2016, when Ahmad Khan Rahimi set off shrapnel-packed explosives in the Chelsea neighborhood of Manhattan. Nobody was killed, but 30 people were injured.

On Tuesday, New York Mayor Bill de Blasio said the truck attack was an attempt to break residents' spirits.

"We have been tested before as a city," he said. "New Yorkers are resilient, and our spirit will never be moved by an act of violence and act to intimidate us."

The bike path where the attack occurred is well-traveled.

Steven Bussen, a 41-year-old bike messenger, takes it frequently and was in the area an hour before the killings.

"You wouldn't imagine this happening," he said. "When I heard ... I knew immediately there was no way it was an accident."

He collected himself briefly as he thought about the people who were likely riding when the attack occurred.

"These are my friends, you know?" he said.