Police praised the “heroic” actions of an employee and officers who responded to an active shooting at a Walmart in Indiana on Thursday that left one person injured.

The gunman — whom police said was a former employee who had been banned from the store — was ultimately killed in a minuteslong shootout with officers.

“Last night could’ve been so, so much worse,” Vanderburgh County Sheriff Noah Robinson said during a press briefing Friday afternoon.

Employees ordered to line up

The incident unfolded just before 10 p.m. local time at the Walmart in Evansville, a riverside city about 180 miles southwest of Indianapolis. The suspect — identified by police as 25-year-old Ronald Ray Mosley II — allegedly walked into the store, went to an employee break room and ordered the dozen or so workers there to line up, according to the Evansville Police Department.

A female employee, a team lead at the store, managed to escape the room while the gunman’s back was turned and called 911, according to Evansville Police Chief Billy Bolin.