New York Police Department spokesman Paul Browne says the gunman was killed near a taxi well outside the hotel on 46th Street and Broadway after a chase from 49th Street at about 11:15 a.m.
A plainclothes police sergeant assigned to an anti-peddler task force had tried to interrupt a peddler selling cds in the area, police sources told NBCNewYork.com.
A chase then ensued and the suspect, identified as 25-year-old Raymond Martinez of he Bronx, pulled a MAC-10 machine gun.
The gunman fired at least twice at the officer, police officials said, but then his gun jammed. One of the rounds fired by the suspect fired shattered the glass window of a nearby store.
That's when the officer, a 41-year-old with 17-years on the job, pulled his weapon, shooting and killing Martinez, officials said.
Tourists who would normally have been filling the pedestrian plaza in front of the hotel this holiday season gawked from behind crime scene tape, using their cell phones and mini-cams to capture the chilling drama.
Police secured the area outside of the hotel, but according to Marriott public relation officials, the hotel itself is not locked down and guests are free to enter and leave the building.
Officials said that several business cards from gun shops were found on Martinez after he was shot.
One, from "Gary's Guns and Transfers" in Virginia, had writing on the back which said: "I just finished watching [the movie] The Last Dragon, I feel sorry for a cop if he think I'm getting into his paddywaggon."
Cops said Martinez had also been wanted on a prior assault in the Bronx, and the powerful gun he possessed had been stolen from a Richmond, Virginia.