When Waco teacher Linda Hampton saw that one of her preschool students had stuffed so much pizza into his mouth that he seemed to be choking, she moved quickly across the room and performed a finger-sweep, pulling the doughy gob out of his mouth.

In response, a year later state regulators tried to take away her teaching license.

The foundation of the Texas Education Agency’s case: a classroom aide who claimed Hampton’s actions were a mean-spirited attempt to deprive the 5-year-old of his breakfast.

The only other adult in the room at the time said the 30-year teaching veteran’s reaction had saved the boy from potential harm. But investigators never spoke to her, court documents show. The complaining aide later admitted the student was in distress.

The education agency nevertheless pursued its case against Hampton to the State Office of Administrative Hearings, which adjudicates occupational disputes. This week, after a two-year legal battle, Administrative Judge Fernando Rodriguez recommended it be tossed.

RELATED: In a first, judge finds teacher’s Colorado high doesn’t count in Texas

Instead of showing Hampton was unworthy of her teaching credentials because she had denied the boy food and assaulted him, "the facts and evidence prove the opposite," the judge concluded. She "performed a CPR technique that relieved (the student’s) distress and may have prevented more serious injury."

Hampton, whom court documents describe as having an unblemished record and positive work evaluations before the incident, is no longer employed at the school, after quitting "in disgust" over the investigation. Both her attorney, Amanda Moore of the Texas State Teachers Association, and TEA spokeswoman Lauren Callahan said they could not comment because the case is ongoing.

The incident occurred in April 2015. According to administrative court documents, the unidentified 5-year-old had been disruptive recently — he "cursed, spit at children, pulled their hair, took their food, threw things and refused to obey teacher and teacher-aide instructions."

In response to such outbursts, the school had deployed a new strategy. Instead of using traditional "time-out," the principal at Hines Elementary promoted "conscious discipline": "The misbehaving child is sent to a ‘safe place,’ such as a cushion or comfortable place in the classroom until he or she calms down," according to documents. A teacher then explained how the misbehaving child could rejoin the class when the behavior improved.

BE THE FIRST TO KNOW: When big news breaks, we send Breaking News emails. Click to sign up

On the morning of April 21, the boy "was extremely disruptive," court documents say. So "Ms. Hampton took (him) aside and told him that he could not eat with the other children until he ‘calmed down.’ " Once he was in the safe place, Hampton briefly left the classroom in the hands of teacher’s aide Sherri Mills while she took care of an administrative task.

Another aide, Marchelle Williams, entered the room soon after to help serve breakfast. Although the boy told her Hampton had instructed him not to eat yet, Williams responded, "Well, she’s not in here right now," and gave him pizza. Soon after, Mills noticed he had stuffed so much into his mouth that "he looked ‘like a little chipmunk.’ "

"This unsafe condition was resolved when (Hampton) walk (sic) toward the child and performed a basic index finger swipe to clear the child’s mouth," Mills later wrote in a memo. "She cautioned him not to put so much food in his mouth at any one time."

Records show Williams reported the incident to Texas Child Protective Services 10 days later. In her version, though, Hampton had been so angry that the 5-year-old was given food against her orders that she had pulled it out of his mouth.

The report of a teacher denying a young child his food triggered school and state investigations. On May 1, Hampton was called into the principal’s office and confronted by a school district police officer.

Hampton said later that it was several minutes before she understood why she was being questioned. Eventually, she was told she was being investigated for assault, and she was placed on administrative leave.

The CPS investigator, meanwhile, concluded that Hampton had committed "neglectful supervision" by placing the boy in a harmful situation and then failing to remove him from it.

Both the school and state investigators later acknowledged they didn’t know that Mills, the teacher’s aide, was in the classroom, documents show. The court record also shows that even Williams, who’d reported Hampton to CPS, conceded that the boy "was choking because he was trying to swallow all the pizza he had stuffed into his mouth."

In August 2016, however, the state education agency’s Educator Leadership and Quality Division formally filed papers to revoke Hampton’s teacher’s license, asserting that her behavior was at least a violation of the profession’s Code of Ethics and at worst a crime.

Last week, Judge Gonzales determined otherwise. "Ms. Hampton’s actions did not amount to assault," he wrote, "but rather, helped a distressed student."

The State Board for Educator Certification, which has the final say on licensing matters, can accept, modify or reject the judge’s finding. It will hear Hampton’s case at its October meeting, Callahan said.