Updated

A job-related dispute led to a health care worker opening fire inside a hospital in a shooting that left two people dead and another critically injured, authorities said Thursday.

A man pulled out a gun and shot two people Wednesday night inside UAB Highlands, which is affiliated with the University of Alabama at Birmingham. The man then killed himself with a shot to the head, authorities said.

UAB spokesman Tyler Greer said the gunman, who police identified as 31-year-old Trevis Coleman of Birmingham, worked for UAB, as did Nancy Swift, a 63-year-old nursing manager who was killed.

A man who worked for Steris, a contractor who manages the hospital's sterile supplies, was wounded and listed in critical condition. Authorities didn't release his name, and Steris referred questions to police.

Lt. Peter Williston, a spokesman for the Birmingham Police Department, said investigators were still sorting out what had occurred.

"We do know it was an employee relations issues that led to what happened," he said.

UAB Highlands is a campus of UAB Hospital, part of the medical school at the university.

Officials said metal detectors were in use, but they didn't explain how the shooter entered the building with a gun.

The shootings forced the hospital to cancel all of Thursday's scheduled surgeries.

"We ask that you please join us in prayer for these families, those who work where the incident occurred, and those who were immediately on the scene, including the first responders who acted so heroically under extremely difficult circumstances," said Anthony Patterson, senior vice president of inpatient services for UAB Hospital.

Patterson said counseling services would be provided for employees.