(sundrawalex / iStockphoto.com.)

In the wake of the deadliest mass shooting in modern U.S. history and in the midst of a fierce national debate over gun control, a Pennsylvania federal judge has ruled that a former state trooper, who over a decade ago was involuntarily committed to a hospital for attempting suicide, can own firearms.

U.S. District Judge John E. Jones of the Middle District of Pennsylvania granted judgment in favor of Michael Keyes, a former U.S. Air Force veteran and retired master trooper with the Pennsylvania State Police who sued the federal government after the state courts rejected his bid to expunge his mental health record. Keyes argued that he was unable to own guns under federal law with the committal on his record, even though he was entrusted with a service pistol while on duty as a state trooper.

Jones wrote in his opinion that Keyes—who suffered from depression and attempted to kill himself by overdosing on pills and alcohol—was not a public safety risk because he never committed any serious crimes and has not made any “unvirtuous” choices in the time since his hospitalization, which occurred over 10 years ago in the middle of a messy divorce. Jones determined that Keyes is not likely to relapse, since his troubles stemmed largely from his relationship with his ex-wife and he is no longer battling depression.

However, Jones acknowledged his ruling comes at a time when mass shootings have reached epidemic proportions.

“We freely acknowledge our mindfulness of the fact that this decision is rendered in a time when our country appears awash in gun violence. Given the tenor of the times, it would be easy and indeed alluring to conclude that plaintiff lacks any recourse,” Jones said. “But to do so would be an abdication of this court’s responsibility to carefully apply precedent, even when, as here, it is less than clear. Our jurisprudence and the unique facts presented guide us to the inescapable conclusion that if the Second Amendment is to mean anything, and it is beyond peradventure that it does, plaintiff is entitled to relief.”

Daniel Reiss, the Justice Department attorney who represented the government, declined to comment on Jones’ ruling.

Keyes’ case was originally filed against Obama administration appointee, former U.S. Attorney General Eric Holder. But since the 2016 election, current U.S. Attorney General Jeff Sessions has become the lead defendant.

The Trump administration, and more traditional conservatives in Congress, have been slow to embrace gun control measures or regulations putting up hurdles to gun ownership. The current administration’s stance and the shift in priorities from the previous administration could potentially alter the federal government’s approach to cases like Keyes’ going forward.

Joshua Prince, Keyes’ attorney, said he and his client ”believe that the framework utilized by Judge Jones will be adopted by the Third Circuit in any future Second Amendment mental health challenge that may come before it.”

“As we have contended from the onset, especially in light of the fact that Mr. Keyes was permitted to possess firearms in his professional capacity as a Pennsylvania state trooper, there cannot be any governmental interest in denying Mr. Keyes his Second Amendment rights, in his private capacity,” Prince said.

Keyes’ former co-plaintiff, correctional officer Jonathan K. Yox, who had been committed as a juvenile for entering into a suicide pact, filed almost identical claims. But Yox’s rights to private gun ownership were restored on the basis that he already safely handled firearms as part of his job.

In a ruling in July 2016, Jones held that Yox’s Second Amendment rights had been violated because he had not had any additional episodes to indicate that he was dangerous since an eight-day stay in a mental facility—the result of his parents’ “emotionally devastating divorce,” which occurred roughly a decade earlier when he was 15 years old.

Additionally, Jones said that Yox’s case was striking because he was already approved to use firearms in his capacity as a corrections officer, and had used weapons such as fully automatic rifles and grenade launchers during his time in the military without incident.