A man who Lakewood police shot and wounded last week had a run-in with officers two weeks earlier when he was subdued by a stun gun while wielding a knife according to charging papers.

In the most recent incident, Anthony Eric Chavez, 24, pleaded not guilty Wednesday to first-degree assault, theft of a firearm and unlawful carrying or handling of weapons apparently capable of producing bodily harm.

Court Commissioner Meagan Foley set his bail at $500,000.

An attorney for Chavez was not reachable for comment Thursday.

Never miss a local story.

Sign up today for unlimited digital access to our website, apps, the digital newspaper and more.

Other officers who arrived to help found Chavez face down with a non-life-threatening gunshot wound and a handgun nearby.

Lee said he ordered Chavez to get on the ground and to drop the gun but instead he pointed the firearm at him. Lee said he shot Chavez because he believed the man was about to fire at him.

Despite being shot, Chavez was not incapacitated and didn’t drop the gun or surrender, Lee said. Instead, Lee said, Chavez moved behind a large utility box, as if seeking cover, and the officer kept firing until he went down.

Chavez appeared to still have the gun pointed at the officer, until the others arrived and took him into custody.

At the hospital, Chavez asked police to apologize for his actions to Lee. He said he took the gun from a friend’s apartment at the complex, and was trying to shoot himself as Lee arrived, but couldn’t get the gun to fire.

The mother of Chavez’s children told police he was hit by shrapnel while in the Army and suffered a traumatic brain injury and has post traumatic stress disorder. He started drinking heavily and taking illegal drugs after his injury, and refused his medications, she said.

She told police he had tried to kill himself multiple times.

The day he was shot, Chavez met with her, gave her his dog tags and wallet, and told her to give them to their son, the woman said.

He then said he would kill her and their children if she didn’t get back together with him, and walked away, the woman said.

Lee was placed on paid administrative leave, which is standard procedure after a shooting. The 41-year-old officer has worked at the department for more than 13 years and has not been involved in any previous shootings, police spokesman Chris Lawler said.