The social studies teacher who barricaded himself in a Georgia classroom and fired a gun reported an unfounded claim to cops in 2016 that he was involved in a woman’s death, according to a report.

Jesse Randall Davidson, 53, who has taught at Dalton High School since 2004, told police he had an online affair with a woman who refused to end contact with him, NBC News reported.

Two of his friends offered to “take care of her” and he said he agreed, according to a 2016 police report.

When Davidson later asked if they scared her, the pals said it was worse than that, leading him to believe they had killed her, the report said. The claims were unfounded.

“It appears the subject may be delusional or have something else that had occurred that is causing to have these thoughts,” the report said.

Davidson, who had been taking medications for depression at the time, had just gotten out of a hospital when he spoke to authorities on March 21, 2016.

In 2017, he also had an incident near campus when he called his son and mother to pick him up because he didn’t feel well, NBC News reported.

School staffers found him almost a mile from the school, sitting on a curb.

Davidson, who was conscious but unresponsive, was taken to a hospital via EMS, according to an incident report.

On Wednesday, Davidson holed up in an empty classroom as students tried to enter the room, police said. He surrendered less than an hour later.

A bullet had gone through an exterior window of the room, but it didn’t appear he was aiming at anyone, police spokesman Bruce Frazier said.

Davidson was charged with aggravated assault, carrying a weapon on school grounds, terroristic threats, reckless conduct, possession of a gun during commission of a crime, and disrupting public school.