(CNN) -- Ten months after being released from a mental institution, the suspect in the slaying of a West Virginia sheriff was able to purchase a gun that authorities say was used in the crime because his mental health information was not entered into a federal database, two sources with knowledge of the investigation told CNN. How the violent mentally ill can buy guns Tennis Maynard, 37, has been charged with first-degree murder in the killing of Sheriff Walter E. "Eugene" Crum and with attempted murder after he allegedly pointed a gun at a sheriff's deputy who chased him. His family admitted him to a mental hospital in February 2010, according to both sources. That would have disqualified him from buying a firearm or even being in the presence of guns, authorities say.
@highlight
W. Virginia officials didn't update a background check database in time, prosecutor says
@highlight
The "inexcusable delay" allowed suspect to buy a gun, prosecutor says
@highlight
Once updated, database stopped a second gun purchase by Tennis Melvin Maynard
@highlight
Maynard is accused of killing West Virginia Sheriff Walter E. "Eugene" Crum
It's also unknown how many guns were seized from @placeholder's home where he lived with his parents and how many belonged to Maynard.