MOODY, ALA. -- A police officer was fatally shot Tuesday night when responding to a call at a motel in Alabama, and two people were arrested, authorities said.

Sgt. Stephen Williams, 50, had spent three years with the Moody Police Department, news outlets reported. He was shot shortly before 9:30 p.m. and taken by ambulance to a hospital.

In a statement, Gov. Kay Ivey didn't release details about what happened but said Williams died a hero.

"Beyond his career in law enforcement, he was a father, and now, three children are left without their dad. We must not forget Sgt. Williams' ultimate sacrifice was that of his family," she said.

Moody Police Chief Thomas Hunt said Williams, a 23-year veteran of law enforcement, was pronounced dead after a shooting at a Super 8 motel.

"He was just a good man, a good person, fun to be around," Hunt said.

News outlets reported there was a possible standoff at the motel with a heavy police presence, and two suspects have been taken into custody. Authorities did not immediately release their names or any possible charges.

Video from the scene showed dozens of law enforcement vehicles and a medical helicopter. ABC 33/40 reported that a camera at a nearby business captured audio of what sounded like a barrage of gunfire.

Amar Fouda told al.com he heard a lot of noise from the room next to his. "I heard like an AK-47," he said. Fouda said he ran into the bathroom and hid in the tub.

The chief federal prosecutor for north Alabama, U.S. Attorney Jay Town, said Williams' death represented "a loss for all of Alabama."

"This serves as yet another heartbreaking and stark reminder of the perils encountered by law enforcement each day," Town said in a statement.

Located in St. Clair County, Moody is about 22 miles (35 kilometres) east of Birmingham.