NEW YORK - A plainclothes cop chased a scam artist through sidewalks crowded with holiday shoppers and tourists in the heart of Times Square yesterday, killing the suspect near a landmark Broadway hotel after a gunfight that shattered box-office and gift-shop windows, police said.

No one else was injured.

The suspect, Raymond Martinez, 25, of the Bronx, and his brother were trying to dupe tourists into buying CDs near Broadway and 44th Street just before noon when he was recognized by a sergeant who runs a task force that monitors aggressive panhandling, Police Commissioner Raymond Kelly said.

The officer, Sgt. Christopher Newsom, asked them for their tax identification, which allows peddlers to sell on the streets. But Martinez took off running, to the Marriott Marquis hotel's passenger drop-off area.

Newsom pursued, and Martinez turned and fired with a Mac-10 9mm machine pistol that held 30 rounds; he got off two shots before it jammed, police said. Newsom fired four times, striking Martinez in the chest and arms and killing him, Kelly said.

"We're lucky the weapon jammed," Kelly said.

Kelly said that the shooting appeared to be within department guidelines, which allow for deadly force when an officer's life is threatened.

Dave Kinahan, a tourist from Boston, was parking his car in a spot below street level at the hotel when he saw one man shooting another.

"I was 20 yards away," Kinahan said. He said that he thought, "Is this real or this a movie?"

The hotel is located in the Broadway theater district in the heart of Times Square. The Marquis Theatre, where "White Christmas" is now playing, is in the hotel. Bullets from the gunfight shattered the window of the Broadway Baby gift shop and a side window of the box office on the street, police said.

Duncan Stewart, a Broadway casting director for National Artists Management Co., has a 12th-floor office that overlooks Times Square. He said that he was on the phone when he heard three loud pops.

Stewart has worked in Times Square for the past three years. He has gotten used to seeing the weird and wacky, but almost never anything violent.

"It's bizarre," he said. "It's one thing to see the Naked Cowboy day after day in Times Square, but a shooting is something different altogether."

Police say Martinez and his brother, who is in custody, were working a scam in which they would approach tourists, ask them their names, then write the names on the CDs and demand payment of $10. They claim that the CDs are original work they've created, but it's unclear if that's true. They had already been given a summons by officers this year for not having identification.

Martinez had been wanted for assault in the Bronx. The gun he used in the shooting was reported stolen in Richmond, Va., on Oct. 28, police said.

He also had with him several business cards from gun dealers there, but it's not clear if he was also selling weapons, police said.

One of the cards had a handwritten message on the back: "I just finished watching 'The Last Dragon.' I feel sorry for a cop if he think I'm getting into his paddy wagon," according to police. It's unclear who wrote the message, which apparently refers to the 1985 martial arts movie.

NYPD spokesman Paul Browne said that officers pay special attention to scams and panhandling during the holidays. Specialized units are set up in areas, including Times Square and Canal Street, where stolen goods, knockoffs and scams are prevalent.

"We focus on them this time of the year, because they're preying on tourists during the Christmas holidays," Browne said.

NYPD Capt. Edward Winski, of the Midtown precinct, where the shooting occurred, said that arrests involving sellers on the streets have increased in the past few years. So far this year, there have been more than 400 arrests involving illegal and licensed peddlers around Times Square.

But some say that peddlers get a bad rap.

"I think they get treated tougher than they actually are," said Zach McCabe, a comedian who has been passing out fliers for his shows for nearly a year on the strip of Broadway where the CD peddlers often stop tourists.

He said that he didn't think the vendors harass people. "I don't see it. I see them talking to people."

A few hours after the shooting, the area had returned to the normal holiday bustle, even as dozens of police officers surrounded the hotel.

Donna Anderson, of Murray, Utah, was staying at the Marquis. She was intrigued by what happened - not scared.

"I wanted to get a picture of the crime scene," she said.