Some of the wounded were grazed by bullets and others hit directly, but all were expected to survive, officials said.
The gunshots rang out on the Fifth Avenue side of the building at around 9 a.m., a time of day when the sidewalks around the building are packed with pedestrians and merchants were opening their shops.
"People were yelling 'Get down! Get down!' ", said Marc Engel, an accountant who was on a bus in the area when he heard the shots. "It took about 15 seconds, a lot of 'pop, pop, pop, pop,' one shot after the other."
Afterward, he saw the sidewalks littered with the wounded, including one person "dripping enough blood to leave a stream."
After the shootout, crowds of tourists and people on their way to work gathered along 34th Street, which was shut down by police. Police helicopters buzzed overhead and swarms of officers were gathered around the crime scene.
Jeffrey Johnson, 58, who was laid off about a year ago at Hazan Imports, fired three times at the company's 41-year-old office manager, shooting the man in the head, Police Commissioner Raymond Kelly said. The two had traded accusations of harassment when Johnson worked there, he said.
Johnson walked away, and a construction worker who saw the shooting followed Johnson and alerted two police officers, a detail regularly assigned to patrol the 1,454-foot skyscraper since the 9/11 terror attacks, officials said.
Surveillance video footage shows Johnson reaching into a bag, pulling out a .45-caliber pistol and pointing it at officers, Kelly said. The officers drew their weapons and started firing, killing Johnson, Kelly said.
Kelly initially said Johnson fired on officers, but police said later they were trying to determine whether Johnson actually fired shots.
Erica Solar doesn't know who shot her in the back of the knee while she walked to get coffee on her way to work, said her brother, Louis Lleras.
"She just heard shots and she fell to the ground a couple of steps forward and noticed that she was shot," Lleras said.
The two officers fired a total of 14 rounds, he said. Mayor Michael Bloomberg said some of the nine wounded might have been shot by police in the mayhem. Johnson's semi-automatic weapon was equipped to fire at least eight rounds; at least one round was left in the clip, police said.
Johnson worked at the company near the building for about six years and was laid off because of downsizing, Kelly said.
"We were just working here and we just heard bang, bang, bang!" said Mohammed Bachchu, 22, of Queens, a worker at a nearby souvenir shop. He said he rushed from the building and saw seven people lying on the ground, covered in blood.
Queens resident Rebecca Fox, 27, said she saw people running down the street and initially thought it was a celebrity sighting, but then saw a woman shot in the foot and a man dead on the ground.
"I was scared and shocked and literally shaking," she said. She said police seemed to appear in seconds. "It was like CSI, but it was real."
Hassam Cissa, 22, of the Bronx, said he saw two bodies on the ground and police applying a white cloth to a man's stomach wound.
Gunshots so close to one of the city's leading tourist attractions immediately prompted fears of terrorism, but federal officials said that wasn't the case, and a guard at skyscraper said it didn't involve the parts of the building where tourists gather to visit the skyscraper.
The gunfire came less than two weeks after a knife-wielding man was shot dead by police near Times Square, another tourist-saturated part of the city. Authorities say police shot 51-year-old Darrius Kennedy after he lunged at officers with a kitchen knife Aug. 12. Kennedy was smoking marijuana in Times Square on a Saturday afternoon when officers first approached, police said. It was the beginning of an encounter that would stretch for seven crowded blocks.
In 1997, a gunman opened fire on the 86th-floor observation deck of the Empire State Building, killing one tourist and wounding six others before fatally shooting himself.
Metal detectors and bag searchers have been standard at the 102-story skyscraper since the 1997 shooting.
Millions of tourists visiting New York ascend its heights to gape over the city from its observation deck, made famous in films such as Sleepless in Seattle. It was 1933's King Kong that showed a giant ape clutching Fay Wray and fending off airplanes atop the tower.