The suspect whom police officer Stephen Mader confronted was visibly distraught, and his hands were behind his back.

Following orders from Mader, the man showed his hands, revealing a handgun. The officer ordered him to drop the weapon.

“I can’t do that,” the man said, according to court documents. “Just shoot me.”

“Just shoot me,” he said a few more times.

Mader, who is white, didn’t, thinking deadly force was not necessary. He believed that the man, Ronald J. Williams, who is black, was a threat to himself but not to others.

Another officer shot and killed Williams, but Mader’s decision to not shoot would cost him his job as a police officer for the city of Weirton, W.Va., according to allegations in a federal lawsuit he filed last week against his former employer.

The complaint described Mader’s 2016 encounter with Williams and alleged that city officials wrongfully fired Mader. Williams wanted to commit “suicide by cop,” the complaint said — and the handgun he was carrying was not loaded.

Timothy O’Brien, Mader’s attorney, said what happened to his client is uncommon.