A Tennessee middle school counselor is being hailed a hero after she talked a 14-year-old boy who came to school with a loaded gun out of his alleged plans to shoot teachers and a police officer this week, according to the Cheatham County Sheriff’s Office.

Molly Hudgens, a counselor at Sycamore Middle School in Pleasant View, Tennessee, “single-handedly” prevented a “potential deadly mass shooting” on Wednesday, Cheatham County Sheriff Mike Breedlove said at a news conference.

Shortly after the first-period class that day, the 14-year-old student requested to speak to Hudgens, according to the sheriff. Upon entering her office, he “started asking various questions that alarmed” Hudgens, who “sensed that something was wrong.”

After asking if he had a gun, the student “affirmed he did” and that he was holding it “under his clothing,” Breedlove said. The teen then “advised Ms. Hudgens that he was going to kill some teachers and a police officer — not students,” according to Breedlove.

The 14-year-old “indicated that she would be the only one to talk him out of it,” the sheriff said.

Hudgens spent nearly an hour talking to the armed 14-year-old and eventually convinced him to give her his gun, Breedlove said.

The sheriff added that the counselor “had a lot on her shoulders” as she was simultaneously trying to alert law enforcement using her cell phone in “a discreet manner” so she would not alarm the teen or cause him to panic.

After successfully alerting school officials and law enforcement, and recovering the teen’s gun, deputies with the sheriff’s office arrived within a few minutes, Breedlove said. They recovered a “fully loaded semi-automatic handgun, along with additional ammunition,” and took the teen into custody, he said.

Read more about this heroic teacher’s actions at ABC News.