An armed, veteran police officer who stood idle for several minutes as the Las Vegas gunman slaughtered dozens of concertgoers in 2017 was fired by the department months ago, officials revealed Tuesday.

Cordell Hendrex was fired March 20 from the Las Vegas Metropolitan Police Department, spokesman Larry Hadfield told the Associated Press.

While officials did not reveal additional details on what led to Hendrex's termination, police union president Steve Grammas said the officer was fired because of his actions during the Oct. 1, 2017 mass shooting.

LAS VEGAS COP 'TERRIFIED WITH FEAR' AS GUNMAN MURDERED DOZENS, BODY CAMERA FOOTAGE SHOWS

Hendrex acknowledged in a police report that he was "terrified with fear" as gunman Stephen Paddock -- a floor above him -- killed 58 people in the deadliest mass shooting in modern U.S. history.

"I froze right there in the middle of the hall for how long I can't say," he wrote in the report.

In video footage released by police, Hendrex could be seen leading a police trainee and three Mandalay Bay security guards to the sounds of gunfire coming from the hotel’s 32nd floor, where Paddock set up his sniper post, but not confronting the shooter. In body cam videos, Hendrex is seen directing the group, with their handguns drawn, on the 31st floor.

"Holy s---. That's rapid fire,” Hendrex is heard saying amid the sounds of Paddock unloading his rifle. “Oh my God,” he later says, before letting out an exasperated sigh.

Hendrex, who worked with the police department since August 2008, also told police radio he was “inside the Mandalay Bay on the 31st floor, we can hear automatic fire coming from one floor above us.”

"Just be advised it is automatic fire, fully automatic fire from an elevated position," he is told in response. “Take cover.”

The video footage, captured by the body camera of Las Vegas Officer Elif Varsin, then showed the group standing in the hallway for about two minutes before taking refuge in a stairwell heading up to the 32nd floor for around 15 minutes, at which point the clip ends.

LAS VEGAS SHOOTING STILL A MYSTERY AS FBI CLOSES INVESTIGATION

Grammas told the Las Vegas Review-Journal, which first reported Hendrex's firing, that the union does not believe the officer should have been fired and is fighting to get him reinstated. The union president said the department only launched an internal affairs investigation after the body camera footage was released and the department received criticism.

The actions of Hendrex -- which drew comparisons to those of Scot Peterson, a former school resource officer who failed to act during the 2018 Parkland high school shooting -- came into the spotlight following records releases. Grammas told the Review-Journal the night of the massacre that officers were "up against something that nobody has been up against before."

“Everybody talks about how they would respond to these things,” he told the paper. “But no one knows until they are up against that evil.”

CLICK HERE FOR THE FOX NEWS APP

News of Hendrex's firing comes on the heels of the firing of four police officers in Florida as a result of their inaction to the 2018 mass shooting at Marjory Stoneman Douglas High School in Parkland, where a gunman killed 17 people.

In January, the FBI said it hadn't concluded anything more about Paddock's mysterious motive for the attack than it had the day after the shooting stopped. Despite police finding 23 weapons in Paddock’s room after the shooting, he left no note to explain the chaotic mess he left behind.

“It wasn't about MGM, Mandalay Bay or a specific casino or venue,” Aaron Rouse, the special agent in charge of the FBI’s Las Vegas office, said at the time. “It was all about doing the maximum amount of damage and him obtaining some form of infamy.”

Fox News Greg Norman, Ryan Gaydos, and The Associated Press contributed to this report.