A gunman shot and wounded a police officer and two employees at a Birmingham, Ala., hospital early Saturday before being shot to death by another officer, authorities said.

The shooting happened shortly after 4 a.m. on the fifth floor of at St. Vincent’s Hospital, WVTM-TV and al.com reported.

Two officers responding to a report of an armed man inside the facility entered the floor from different locations.

"When the officer encountered the suspect, there was immediate gunfire from the suspect," Birmingham Police Sgt. Johnny Williams said, according to The Associated Press.

One officer and two hospital workers were wounded.

A second officer shot and killed the suspect.

Watch the most-viewed videos on NBCNews.com

The injuries to the officer and employees were not life-threatening, Williams said, according to al.com.

Detectives were trying to determine why the armed man was in the hospital. Authorities did not immediately release the names of the suspect or the victims.

The Associated Press contributed to this report.

More content from NBCNews.com:

Follow US news from NBCNews.com on Twitter and Facebook



