Police were sent to St. Vincent's Hospital around 4 a.m. to respond to a report of an armed man inside. Two officers who arrived separately converged on the suspect on the hospital's fifth floor.
"When the officer encountered the suspect, there was immediate gunfire from the suspect," Birmingham Police Sgt. Johnny Williams said. He said detectives were still trying to establish a motive.
A handful of cardiac patients and several staff members were on the fifth floor, hospital spokeswoman Liz Moore told reporters at a news conference later Saturday. She said patient care was not interrupted despite the events.
Alabama has been dealing with a rash of shootings of late.
In the Alabama community of Homewood, police continue to investigate Friday's slayings of a 30-year-old woman and her two sons, ages 4 and 5, at the family's apartment. Authorities said they received a call from a man returning to the apartment from work Friday who said he'd found his family dead. Police said the man was being held in "protective custody."