Scottsdale police shot and killed a man who threatened officers with a knife moments after hospital security wrestled a rifle away from the man, police said.

At 6:50 p.m. Tuesday, officers responded to an emergency traffic call outside of the emergency room at HonorHealth Scottsdale Osborn Medical Center, Scottsdale Police Department spokesman Sgt. Ben Hoster said.

A man outside of a white pickup truck at the entrance to the emergency department was "threatening with a rifle" and unarmed security guards wrestled the rifle away from him, Hoster said.

Two officers and a sergeant arrived at the scene shortly after and contacted the man, who "produced a knife and advanced on the officers," Hoster said.

One of the officers shot the man, Hoster said. The man was given medical attention and taken inside the hospital for treatment but died, Hoster said.

Police did not name the man or share other details.

When asked about the guards who wrestled the rifle away from the man, Hoster said, "This person who did disarm the suspect saved a lot of lives and he’s a true hero."

The white pickup truck could be seen at the entrance to the emergency department as of 9:30 p.m.

The emergency department was closed so medical emergencies were being transferred to other hospitals, Hoster said.

An HonorHealth spokesperson said they could not answer questions about the shooting or current hospital operations and referred questions to Scottsdale police.

This is the sixth police shooting in metro Phoenix in 2020.

This is a developing story. Check back with azcentral for updates.

Reach the reporter Christopher Roth at Christopher.Roth@gannett.com or on Twitter @cprothnews.

Support local journalism. Subscribe to azcentral.com today.