The mother of a 6-year-old Virginia boy who shot and wounded his elementary school teacher pleaded guilty on Monday to federal gun charges in a deal with prosecutors, according to court documents and her lawyer.

Deja Taylor, whose son shot teacher Abby Zwerner at Richneck Elementary School in Newport News in January, pleaded guilty in federal court to being a user of marijuana while in possession of a firearm. While many states have legalized marijuana, it remains illegal under federal law.

Taylor also pleaded guilty to lying about her marijuana use during the background check required to obtain the 9mm semiautomatic pistol that her son used to shoot the teacher.

Taylor's lawyers have previously said that it was a mystery how the boy got hold of the gun. Prosecutors said in court documents that no gun locks or safety boxes were found in law enforcement searches of her residences.

As part of the plea deal, prosecutors are seeking a maximum of two years in prison for Taylor, her attorney Gene Rossi said by phone. He hopes the judge will give her probation.

Taylor - who still faces separate charges in state court related to the shooting - will be sentenced on Oct. 18. Virginia prosecutors charged her in April with felony child neglect and with the misdemeanor of recklessly leaving a loaded weapon so as to endanger a child.

"This case is a tragedy," Rossi said. "It's a perfect storm of horrible consequences."

According to police, the boy had taken the handgun from home, placed it in his backpack and removed it while Zwerner, 25, was teaching class, firing a single shot through her hand and into her chest.

Another school staffer rushed into the classroom and restrained the boy while Zwerner ushered the rest of the students from the classroom to safety, police said.

Zwerner's lawyer, who filed a $40 million lawsuit against school administrators on her client's behalf, has said that Richneck Elementary officials had been warned three times the day of the shooting that the boy was armed.

Virginia prosecutors did not charge the boy.