Gary Conrad was fatally shot in Midtown Wednesday morning, officials said. View Full Caption DNAinfo/Trevor Kapp

WARNING: This story contains graphic images.

MIDTOWN — Police fatally shot a knife-wielding man and grazed a bystander on a busy Manhattan street during Wednesday morning's rush hour, officials said.

Gary Conrad, 46, tried to buy beer at a Food Emporium at the corner of Eighth Avenue and West 49th Street about 8:30 a.m. but flew into a rage when a cashier asked for identification and started calling her racial epithets, sources said.

"He was swearing at the people in the store, toward the workers in the store," said NYPD Chief of Department James O'Neill.

Food Emporium staff escorted Conrad, who worked as a stagehand at nearby theaters and has multiple knife-related arrests, outside and hailed an officer posted at a Verizon workers strike site a block north, sources said.

The officer confronted Conrad, but the two quickly come to blows and the officer knocked him to the ground, sources said.

Meanwhile, a retired state detective notified a nearby sergeant and officer with the grand larceny unit of the Midtown North Precinct who went to lend a hand, sources said.

The suspect stood up clutching an eight-inch knife and started approaching the intervening sergeant and officer, refusing their repeated commands of "Drop the knife! Drop the knife!" according to sources.

"He continued to approach them with the knife in his hand. At this point, one officer and a sergeant fired at the suspect," the chief said.

The suspect struggled with an officer, falling to the ground. As the suspect got back up he displayed a knife pic.twitter.com/PmuS9l5zS1 — NYPD NEWS (@NYPDnews) May 18, 2016

"I heard three shots. Boom, boom, boom. One after another. Everybody started running up Eighth Avenue. It was so scary," said Abraham Obaretin, 36, a nearby newspaper vendor.

After police fired nine shots, Conrad, who is from Massachusetts a source told DNAinfo, lay face down in the middle of the intersection wearing a backpack with blood streaming out of his head and his hands cuffed behind his back, according to photos posted to social media.

The stagehand was pronounced dead at the scene, officials said.

One of the police bullets grazed a female bystander from California who was standing about a block away and is days away from her 46th birthday, officials said. Afterwards, the woman sat on the curb surrounded by police officers, witnesses said.

"[Her arm] was bleeding badly," witness Anthony Tessitore, 27, said.

The intersection erupted into chaos immediately and commuters on their way to work scattered.

"Cops were running down here. People were flooding the area. It was crazy. People didn't know where to go," said Michael Abbate, 54.

The officer who fired the shot also seemed shaken by the violence.

"The cop started crying immediately. You could tell he was remorseful for what he had done," said Tessitore, who was 20 feet away when the gunfire broke out.

8th avenue commute got dicey this morning... pic.twitter.com/6zRdx6gZUj — Dan Lyons (@The_RealDanimal) May 18, 2016

Emergency medical crews tended to the woman at the scene before taking her to Bellevue Hospital, where she was treated for minor injuries, officials said.

"They were wrapping her arm and putting her on a stretcher. They were attending to her," Obaretin said.

The officer who tackled Conrad in the initial altercation was also treated for a minor cut to his arm at Bellevue, sources said.

Cops shoot man dead 49th & 8th #nyc pic.twitter.com/2BfmaL6bpE — Tamar Mendelsohn (@Tamarmilly) May 18, 2016

A man was shot and killed this morning on 8th Ave on 49th St. Avenue closed pic.twitter.com/pGoBEOMc5V — ArthurT (@arthurtsao) May 18, 2016

Police taped off Eighth Avenue between 42nd Street and 49th Street, keeping cars and pedestrians out of the crime scene while they investigated, officials said.

Police are reviewing footage of the encounter taken by surveillance cameras near the scene, sources said.

Due to police activity, 8th Avenue from 42nd St - 49th St is closed in MN. Consider alternate routes. — NYCEM - Notify NYC (@NotifyNYC) May 18, 2016

In a similar incident, police shot a man who had been randomly attacking people with a hammer and tried to hit an NYPD officer near Port Authority on May 13, 2015.