SOUTH BRONX, New York (WABC) -- Law enforcement officials have identified the gunman in the shooting inside Bronx Lebanon Hospital as 45-year-old Dr. Henry Bello, a family medicine physician and former employee of the hospital.
Authorities are investigating the shooting as a possible workplace dispute.
Mayor Bill de Blasio called it an "isolated incident", and not an act of terrorism.
Police sources say Bello resigned from Bronx Lebanon Hospital two years ago before he was terminated amid sexual harassment allegations.
According to a law enforcement official, the shooter was wearing a lab coat and had the rifle concealed inside it.
NYPD Commissioner James O'Neill said Bello apparently tried to set himself on fire on the 16th floor of the hospital.
Police found Bello dead of a self-inflicted gunshot wound on the 17th floor. The assault rifle was found nearby.
A former colleague described Bello as a problematic employee.
Bello "was very aggressive, talking loudly, threatening people. All the time he was a problem," said Dr. David Lazala, a family medicine doctor who said he trained Bello at Bronx Lebanon.
He said Bello, who worked at night as a doctor, sent him a threatening email after Bello was fired.
In the two years after resigning from the hospital, Bello, a Nigerian national, appears to have been a transient - living at five different addresses, including an apartment in the East Village, law enforcement sources said.
A former neighbor there remembered the physician who lived across the hall. "He was a nice guy," the neighbor said. "He would carry packages for me. He was always in good spirits. He lived here about a year and a half ago, I think, for a year."
Bello's most recent address might have been the Bellevue Mens Shelter, where he moved out in March. Detectives are currently trying to determine where he has been living since then.
Bello worked as a pharmacy technician at Metropolitan Hospital in East Harlem for 10 months in 2012, before starting at Bronx Lebanon Hospital in the summer of 2014.
At that time, he was still in the process of becoming licensed to practice medicine in New York State. On July 1, 2014, he received a limited permit to practice as an international medical graduate to gain experience, which expired on July 1, 2016.
He had previously been issued a pharmacy technician license in California in 2006, around the time he was at University of Southern California.
Investigators have learned that before that, he practiced medicine in West Africa, and attended medical school on the Caribbean island of Dominica.
Bello had four prior arrests, the most serious for sex abuse in Greenwich Village in Aug 2004, when he lifted a 23-year-old woman up by her crotch outside a Bleecker Street building and said, 'You're coming with me.'
He ended up pleading guilty to unlawful imprisonment, a misdemeanor, and was sentenced to community service.
He was charged with unlawful surveillance for peeking under a victim's clothing in Oct 2009, also in Manhattan, and twice more in 2003, for fare beating and burglary.
(The Associated Press contributed to this report.)