A terrorist in a rental truck sped for nearly a mile down a popular bike-only path in lower Manhattan on Tuesday — killing eight people in the shadow of the World Trade Center and then shouting, “Allahu Akbar.”

“This was an act of terror,” Mayor Bill de Blasio declared at an evening press conference.

“A particularly cowardly act of terror aimed at innocent civilians, aimed at innocent people going about their lives.”

Sayfullo Saipov, a 29-year-old immigrant from Uzbekistan, was shot by a cop after getting out of his car at Chambers and West streets with two realistic-looking guns while screaming “Allahu Akbar” — Arabic for “God is great,” police sources said.

“He was running around Chambers and somebody started to chase him,” said a 14-year-old student at nearby Stuyvesant High School, which was just letting out for the day.

“Everybody starts running.”

Saipov’s bloody, 17-block trail of terror began at 3:05 p.m., when he turned onto the bike path at West Houston Street in a Home Depot flatbed pickup truck he’d rented in Passaic, NJ, police sources said.

The maniac, who was carrying a Florida ID, rammed his car into nearly two dozen innocent cyclists and pedestrians as he sped south on the typically serene path along the Hudson River.

“The Home Depot truck starting running people over,” said witness Nelson Arroyo, 58. “I heard a boom boom, a crushing noise from the bikes. People were sitting down crying. I saw two areas of blood.”

Saipov collided with a school bus at Chambers Street, injuring two adults and two children inside.

He then got out with the pellet and paintball guns — sending panicked bystanders fleeing through the streets, sources said.

Tom Gay said he was walking near West Street and Warren Street when a woman came barreling around the corner shouting, “He has a gun! He has a gun!”

The school photographer spotted Saipov, whom he described as a slender man in a blue track suit, running his way.

The man giving chase was a cop, who fired at least five shots. Saipov fell to the ground, still raising his weapon in the air until the officer kicked it out of his hand.

“The uniformed police officer assigned to the 1st Precinct confronted the subject and shot him in the abdomen,” NYPD Commissioner James O’Neill said, adding that he “was wounded and transported to a local hospital.”

Meanwhile, bodies covered in white sheets were left scattered on the path amid the crumpled remains of their rental bicycles, which included Citibikes.

Buildings in the area were put on lockdown, and part of the FDR Drive was shut down as first responders rushed some victims to Bellevue Hospital.

All told, the terror attack just blocks from the World Trade Center killed eight people and injured at least 11 others, including three children, who were rushed to local hospitals.

Six men were pronounced dead at the scene, while another man and woman perished at the hospital, police said.

One of the dead victims was a Belgian national, Didier Reynders, an official from his country said on Twitter.

“I am deeply saddened to announce a Belgian victim in Manhattan — I express my condolences to the family and friends,” he tweeted.

At least two other fatalities were from Argentina.

Three victims remained in critical condition Tuesday evening, including the killer, who was undergoing surgery.

“Our thoughts and prayers with those New Yorkers who we lost today — it reminds us all how precious life is,” Gov. Andrew Cuomo said at the press conference.

“They left the house this morning — they were enjoying the beautiful West Side of Manhattan on a beautiful fall day and they are not going to be returning home. And that shock and that pain is going to be very real.”

Chilling NYPD audio recorded during the slaughter includes shaken cops describing the sight of the “mass casualty situation’’ before them.

“There’s multiple people on the ground, Central. We need buses all the way up to Houston [Street], Central,’’ one officer says urgently, according to a tape obtained by CBS. “I’ve got four or five people on the ground.’’

Another cop says, “We got multiple casualties. This is a mass-casualty situation here.’’

The NYPD and FBI have opened a terror investigation into the attack, and are looking for computers and phones belonging to Saipov, who has a criminal record for several traffic violations.

Police also were executing search warrants in New Jersey, Ohio, and Tampa, Fla. — all locations where Saipov has lived since arriving in the US in 2010, according to records and police sources.

Cuomo described the disturbing act of bloodshed as a lone-wolf attack, similar to others that have been perpetrated by terrorists using vehicles to mow victims down.

“The new terrorist tactic which they have called for publicly are these lone wolves who commit an act of terror,” the governor said.

“But at this point, there’s no evidence to suggest a wider plot or a wider scheme, but the actions of one individual who meant to cause pain and harm and probably death, and the resulting terror, and that was the purpose.”

President Trump tweeted his “condolences and prayers” to the victims of the attack.

“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.!” he wrote.

“We must not allow ISIS to return, or enter, our country after defeating them in the Middle East and elsewhere. Enough!” Trump wrote in a subsequent tweet.

Despite the carnage, the Village Halloween Parade, which draws thousands of revelers every year, still went on.

“We know that this action was intended to break our spirit, but we also know New Yorkers are strong, New Yorkers are resilient,” de Blasio said.

“And our spirit will never be moved by an act of violence, an act meant to intimidate us.”

Additional reporting by Tamar Lapin, Shawn Cohen and Gina Daidone