A knife-wielding man has been gunned down by New York police in front of hundreds of shoppers and office workers.

Darrius Kennedy, 51, was shot dead by police officers who chased him through the city streets before cornering him in Times Square. He had pulled out a six-inch (15-cm) blade and run off when they tried to arrest him for smoking marijuana.

"Right when he pulled the knife, the cops drew their guns," Lincoln Rocha, 28, a Brazilian tourist, told the New York Times.

Kennedy, an Afro-American, died in a hail of bullets at the end of the chase.

Videos show at least eight gun-waving policemen chasing Kennedy. Police tried to confiscate camera phones used to film the incident by bystanders, witnesses said.

Kennedy, from South Carolina, was allegedly smoking a joint near a military recruiting station in Times Square when police stepped in.

Kennedy, who had a criminal record mainly for marijuana possession, became agitated, slipped out of the police officer's grip, pulled out an Ikea kitchen knife and ran off, said police.

They chased him for several blocks and tried to use pepper spray to stop him, but without success.

"He was repeatedly told to drop the knife and we have scores of witnesses who heard the officers doing that," said police spokesman Paul Browne.

After their last failed attempt, two officers shot him down. They have not been identified and have been placed on administrative duty.