New York's mayor has described the attack as a "real tragedy" adding that it was "not an act of terrorism”
Officials in New York say a female doctor has been shot dead by a former colleague at a New York hospital.
New York Mayor Bill de Blasio said six other people were injured in the attack – with five of them left "fighting for their lives."
Describing the rampage at Bronx-Lebanon Hospital Centre as a "real tragedy", Mayor de Blasio said it was a "workplace-related matter" and "not an act of terrorism.”
According to officials, the gunman, a former doctor at the hospital, tried to set himself on fire before fatally shooting himself.
He is believed to have concealed an assault rifle under a lab coat he was wearing to gain access to the building.
He reportedly resigned from the hospital in 2015 following allegations of sexual harassment.
At least one wounded doctor was treated using an emergency fire hose fashioned as a tourniquet, The New York Times reported.
Those wounded were said to be on the 16th and 17th floors - while the lifts were apparently out of service.
According to an ambulance worker, two emergency responders carried a bleeding patient down nine flights of stairs to safety, applying pressure to the man's wound as they descended.
Armed police searched the building floor by floor and at one stage officers could be seen on the roof with their guns drawn.
NYPD Commissioner James O'Neill said the gunman was found on the 17th floor.
“Officers encountered the male suspect lying on the floor, dead, of an apparent self-inflicted gunshot wound,” said Commissioner O’Neill.
“The subject was wearing a white medical-type coat.
“The female victim was also discovered on the 17th floor; she was pronounced dead at the scene.
Witness Garry Trimble said his fiancée, hospital worker Denise Brown, was among the workers trapped inside the building at the time.
He said she called him from inside the building during the shooting.
“She was crying and she said ‘someone is going around shooting,’” he said. “We locked up; we barricaded ourselves in a room with the employees.”
“I went there with my mindset – be quiet, lay low and barricade the door. That is all I was thinking about.”
According to police records, the attacker was arrested in 2009 after two women claimed he tried to look up their skirts with a mirror.
In another unrelated incident, he was held in 2004 after a woman told police he grabbed her, lifted her up and said: "You're coming with me."
A former colleague said the man had sent him a threatening email after resigning from the hospital.
He described him as “very aggressive” and “threatening” adding “all the time he was a problem.”