Police shot and killed a man they say lunged at them with a knife in a confrontation that began in Times Square and drew officers and spectators on a chase that ended with shots fired near one of New York's most heavily touristed areas.

The encounter played out Saturday around 3pm, when officers approached a 51-year-old man they say appeared to be smoking marijuana near West 44th Street and Seventh Avenue, in the heart of Times Square.

The man became agitated, pulled out an 11-inch (28-centimeter) knife and began to put a bandanna on his head, police said. He refused repeated orders to drop the weapon and began backing down the avenue, continuing for a number of blocks and drawing many officers into a slow-speed pursuit that took them south of Times Square.

According to the police account, officers pepper sprayed the man six times but he held onto the knife throughout the seven-block pursuit. At West 37th Street, he lunged at police and two officers shot him in the torso, police said. He was pronounced dead at Bellevue Hospital.

Witnesses recalled a chaotic scene in which some bystanders took cover, while others began following the procession down the avenue in an attempt to capture cellphone video of it. On video obtained by NY1 cable news station, officers, guns drawn, can be seen pursuing the man as he appears to skip down Seventh Avenue.

"He was swinging at people as he ran," Jobby Nogver, 17, told the New York Times. Nogver watched as police surrounded the man and fired. "I can't tell you how many shots," he said.

Priscilla Rocha, a tourist from Brazil, was visiting Times Square with her husband when they saw the confrontation.

"I almost had a heart attack," she told the Times. "Everyone started running."