A Virginia woman whose then-6-year-old son shot his first-grade teacher inside a classroom this year was sentenced Friday to two years in prison for felony child neglect.

Deja Taylor's son, who has not been identified, shot schoolteacher Abigail Zwerner on Jan. 6 at Richneck Elementary in Newport News, Virginia, with Taylor's handgun, authorities said.

During a Friday afternoon court hearing, Circuit Court Judge Christopher Papile ruled Taylor should serve two years in prison.

Taylor was charged with felony child neglect in April, and pleaded guilty in August.

VIRGINIA 6-YEAR-OLD'S CHILLING WORDS AFTER SHOOTING FIRST GRADE TEACHER DURING CLASS REVEALED IN UNSEALED DOCUMENTS 

Deja Taylor arrives to the federal court building in Virginia with her lawyer

Deja Taylor heads to court Sept. 21 in Newport News, Va., with her lawyer, James Ellenson. (Billy Schuerman/The Virginian-Pilot via AP/File)

Taylor faced up to five years in prison, but struck a plea deal with prosecutors. However, Friday's state sentence is longer than the six months prosecutors and her defense had recommended in the plea deal, and harsher than in state sentencing guidelines. 

As part of her plea deal, prosecutors agreed to drop a misdemeanor count of recklessly storing a firearm. 

Taylor’s son told authorities he got his mother’s 9mm pistol by climbing onto a drawer to reach the top of a dresser, where the firearm was in his mom’s purse.

BOY, 13, CHARGED FOR ALLEGEDLY PLOTTING MASS SHOOTING AT OHIO SYNAGOGUE: REPORTS

He concealed the weapon in his backpack and then his pocket before shooting Zwerner in front of her first-grade class.

Mother of a 6-year-old who shot his teacher in Virginia

Deja Taylor, the mother of the 6-year-old who shot his teacher in Virginia. (Stephen M. Katz/The Virginian-Pilot via AP/File)

Taylor initially told investigators she had secured her gun with a trigger lock, but investigators said they never found one.

Her sentencing Friday comes a month after Taylor was sentenced to 21 months in federal prison for using marijuana while owning a firearm.

Her attorneys had argued there were "mitigating circumstances," including her postpartum depression and her schizoaffective disorder diagnosis. In court last month, one of her attorneys read a statement in which she said she would be remorseful "for the rest of my life." 

Zwerner was shot in the left hand and her upper left chest, which caused her to break bones and puncture a lung. 

Abby Zwerner

Abby Zwerner was shot in the abdomen by a 6-year-old student who had brought a gun to school. (Facebook/Abby Zwerner)

She rushed her other students out of the classroom before she collapsed in the school office. 

She has had five surgeries since then and is suing Newport News Public Schools for $40 million, claiming administrators ignored warnings that the boy had a gun. She has since left teaching. 

CLICK HERE TO GET THE FOX NEWS APP

The boy told a school official who restrained him after the shooting, "I shot that (expletive) dead," and "I got my mom’s gun last night," according to search warrants.

The Associated Press contributed to this report.