A man drove a rented van on to a busy New York cycle path, killing eight people in an incident being treated as a terrorist attack.
The driver was then shot by police after jumping out with what turned out to be two fake guns.
He was taken into custody, and his condition was not immediately disclosed.
At least nine people were injured in the incident near the World Trade Centre in Manhattan.
New York Mayor Bill de Blasio said the attacker had killed eight people in “a particularly cowardly act of terror”.
He said the attack was “aimed at innocent civilians going about their daily lives” and “eight innocent people have lost their lives and over a dozen more are injured”.
New York Governor Andrew Cuomo said it was a “lone wolf” attack, and there was no evidence it was part of a wider plot.
The White House said President Donald Trump had been briefed.
White House spokeswoman Sarah Huckabee Sanders said the president and New York native has been briefed by White House chief of staff John Kelly and “will be continually updated as more details are known”.
She said: “Our thoughts and prayers are with all those affected.”
Witnesses described a scene of panic and blood, with people screaming in fear and the path strewn with bodies and mangled bicycles.
Cities around the globe have been on alert against attacks by extremists in vehicles.
The Islamic State group has been encouraging its followers to mow down people, and Britain, France and Germany have all seen deadly vehicle attacks in recent months and years.
Police said the vehicle, a rented Home Depot truck, driven by a 29-year-old man, entered the cycle path on West Street a few streets from the new World Trade Centre and mowed down several people.
The truck also slammed into a small yellow school bus, injuring two adults and two children.
A paintball gun and a pellet gun were found at the scene, police said.
At least two bodies could be seen lying on the path, and the front end of the van was smashed in.
Tom Gay, a school photographer, was on Warren Street and heard people saying there was an accident.
He went down to West Street and a woman came around the corner shouting: “He has a gun! He has a gun!”
Mr Gay said he stuck his head around the corner and saw a slender man in a blue tracksuit running southbound on West Street holding a gun. He said there was a heavyset man pursuing him.
He said he heard five or six shots and the man in the tracksuit fell to the ground, gun still raised in the air.
He said a man came over and kicked the gun out of his hand.
The attack closed roads across the western edge of Manhattan along the Hudson River and sent uniformed officers rushing to the area as people prepared for Halloween festivities, including an annual parade through Greenwich Village.
Eugene Duffy, 43, a chef at a waterfront restaurant, said he was crossing West Street when he heard something, turned back and saw the white truck on the cycle path.
After seeing the mangled bikes, he ran south, seeing the school bus, and officers at the scene, guns drawn, ducked behind patrol cars.
“So many police came and they didn’t know what was happening,” Mr Duffy said.
“People were screaming. Females were screaming at the top of their lungs.”
Uber driver Chen Yi said he saw a truck plough into people on the cycle path. He said he then heard seven to eight shots and then police pointing a gun at a man kneeling on the pavement.
“I saw a lot of blood over there. A lot of people on the ground,” he said.
Video footage of the school bus showed its right side bashed in, and firefighters surrounding it as they worked to free children inside.