New York: In the second terror attack within a month in the US, a man driving a truck ploughed through cyclists and pedestrians on a street near the site of the 9/11 attack killing eight persons. The attacker was shot and arrested by the police.

The suspect was identified as 29-year-old Uzbek Sayfullo Saipov. He then smashed the truck into a school bus on Tuesday, jumped out and ran up and down the highway waving a pellet gun and paintball gun and shouting Allahu Akbar” — before an officer shot him in the abdomen.

He remained in critical condition. New York Mayor Bill de Blasio declared the rampage a “terrorist attack”. Eleven people were injured in the attack.

The mile-long rampage left a trail of smashed bicycles and blood in a mostly residential area with several educational institutions, about 400 metres from the World Trade Centre that was attacked on September 11, 2001 by terrorists on a hijacked plane killing about 2,750 people.

Police reported finding notes left by the man owing allegiance to the Islamic State (IS). Investigators said they had not uncovered evidence of any direct or enabling ties between the man and IS. They were treating the episode as a case of an “inspired” attacker.

Five men killed in the horror were from Argentina and another man was from Belgium. The other two victims had not been identified.

Officials could not say if Saipov was part of a network or a “lone wolf”.

Saipov came to the US from Uzbekistan in 2010 and had a green card that allowed permanent legal residence. He had apparently lived in Paterson, New Jersey, and Tampa, Florida, the New York Times reported.

He rented the killer truck from a home depot in Passaic, New Jersey, before driving it into Manhattan, officials said.

Saipov worked as a driver with Uber. He passed a background check and did not have any rider complaints, according to Uber.

Tuesday’s terror strike occurred just hours before the annual Halloween parade was to take place nearby.

And in a display of defiance against terror, New Yorkers later marched in the scheduled Halloween parade with De Blasio and Governor Andrew Cuomo leading the procession of costumed princesses, ghosts, zombies, superheroes and other characters from myth and entertainment.

This was the first major foreign-inspired terrorist attack in the US after President Donald Trump took over with a vow to stamp out terrorism.

Trump tweeted: “We must not allow IS to return, or enter, our country after defeating them in the Middle East and elsewhere. Enough!”

He ordered extreme vetting of foreign nationals following the attack.

Indian Prime Minister Narendra Modi condemned the incident. He tweeted: “Strongly condemn the terror attack in New York City. My thoughts are with the families of the deceased and prayers with those injured.”

A South Asian student made a video of the last moments of Saipov’s rampage and his capture was broadcast by several TV stations.

The attack happened around the time the nearby schools were ending the day. Of those injured, two were students and another was a school employee who were on the bus hit by the van.

October began with the killing of 58 people at a concert in Las Vegas by a lone gunman in a hotel room. Authorities were unable to find a motive for that attack by Stephen Paddock who killed himself.

Uzbekistan President Shavkat Mirziyoyev said in an open letter published on Wednesday that his country will use all “means necessary” to help the investigation into the attack.