(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.
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.
But in December 2010, Maynard was able to purchase a .40-caliber handgun at a licensed gun dealer in neighboring Logan County, according to the same source, despite a required, computerized background check.
In West Virginia, once a mental hygiene commissioner adjudicates someone with mental health problems at a hearing, the state's mental health registry is notified and the information is transferred to the National Instant Check System.
In Maynard's case, it didn't happen as soon as it should have, the sources say.
Mingo County Prosecuting Attorney Michael Sparks won't confirm or deny that Maynard's mental health record was the specific information that was missing from the federal database. However, Maynard's mother previously told CNN he was involuntarily committed by his family a few years ago.
Sparks said there was an 'inexcusable delay' in relaying information from the state to the federal background check database. Sparks stressed that the firearm dealer who sold the handgun to Maynard did "what was legally required" under the law and performed a background check.
Maynard tried to buy another firearm in early 2011, but that attempt failed when the same computerized system flagged him as ineligible, Sparks said. It's unclear where Maynard tried to purchase the second firearm.
It's also unknown how many guns were seized from Maynard's home where he lived with his parents and how many belonged to Maynard.
Maynard's mother, Olgie Maynard, told CNN last week that her daughter signed paperwork to admit Tennis Maynard to a hospital and that he was there for about a week in 2010. She says her son "went crazy" in their yard. The family called police, and he was taken to a hospital. He also has been a patient at a local mental health clinic, she says.
Booth Goodwin, U.S. attorney for the Southern District of West Virginia, said the Bureau of Alcohol, Tobacco, Firearms and Explosives is continuing its investigation of Maynard's gun history. Goodwin has not yet decided whether to prosecute Maynard on felony federal weapons charges and declined to comment further.
Lying on a gun purchase application is a misdemeanor in West Virginia, however, it is a felony under federal law, according to authorities.
Maynard is accused of killing Crum on April 3 as he sat in his truck just blocks from the county courthouse. The suspect parked his car close to the sheriff's SUV and shot through the window twice, hitting the sheriff twice in the head, according to a state official who was briefed on the investigation. After a brief chase, Maynard was shot and wounded by a sheriff's deputy in Delbarton, West Virginia, after he wrecked the vehicle he was driving and raised his weapon.
Sparks said the shooter used a Glock .40-caliber handgun to kill the sheriff. Investigators don't know what the motive is.
Maynard is alleged to have made a statement shortly after he was shot, but authorities won't reveal what he said, saying only that it "could have been interpreted in different ways."
Williamson Police Chief Dave Rockel says authorities later spoke to Maynard at his bedside last week, but the suspect was too medicated to make a lucid statement.
On Wednesday, a judge appointed Huntington attorney Rick Weston to represent Maynard, who remains hospitalized as a precautionary measure to help protect his rights, according to Sparks. The prosecutor said he expects to bring evidence before a grand jury within the next couple of weeks.
Investigators have been collecting several pieces of surveillance video evidence and receipts that put Maynard in the area of the courthouse, some within an hour of the fatal shooting, Sparks said.
Police are still seeking surveillance cameras that might have captured the murder itself, Sparks added. A witness told police the alleged shooter was wearing a hood when he fired into the sheriff's vehicle, then fled the scene, according to Sparks.
Crum's daughter said "it's a strong possibility" that her father was killed for vigorously pursuing the illicit drug trade. Crum had taken office only three months before his killing but already had built a reputation for taking out dealers and shutting down "pill mills."
"My dad fought tirelessly against drug abuse. He just wanted to clean up the county and make it a better place to live," Julie Hall told CNN.
"Things are still under investigation at this time. We really are unsure," Hall said. Crum's funeral was Sunday. His wife, Rosie, was appointed last week to complete his term, which runs through the end of next year.
Mandated by the Brady Handgun Violence Prevention Act of 1993 and launched by the FBI in 1998, the NICS is used by federal firearms licensees to determine whether a prospective buyer is eligible to buy firearms or explosives.
The reliability of the NICS system has been a point of contention in the debate on gun violence.
A deal reached by Sens. Joe Manchin, D-West Virginia, and Pat Toomey, R-Pennsylvania, aims to tackle issues some have with the current background check reporting methods. The Manchin-Toomey compromise would require states and the federal government to provide records on criminals and the "violently mentally ill" to the national background check system, addressing a criticism by the NRA and other opponents of gun laws that the existing system lacks substantive information.
CNN's Tom Cohen contributed to this report