Image copyright Whitfield County Sheriff's Office/CBS Image caption Mr Davidson has taught at the school since 2004

A Georgia teacher who barricaded himself in his classroom and fired a handgun is in police custody.

Jesse Randall Davidson, 53, locked his students in the hallway and fired a shot when the principal opened the door, according to US media reports.

No students were hurt by the alleged gunfire but one sprained her ankle.

The incident came two weeks after 17 were killed at a Florida high school and President Trump called for teachers to be armed to tackle mass shooters.

Dalton police spokesman Bruce Frazier said that the Dalton High School teacher barricaded the door when his students tried to enter.

When the headmaster, Steve Bartoo, attempted to open the door with a key, he heard a gunshot.

Image copyright Google Maps/CBS Image caption Dalton High School on Google Maps

The school in Dalton - a city about 90 miles (145km) northwest of Atlanta - was placed on lockdown, the spokesman said.

A standoff lasted up to 45 minutes before Mr Davidson was taken into custody. Mr Bartoo said the teacher made "nonsensical noises" during the exchange.

Police announced late on Wednesday that the teacher has been charged with "aggravated assault, carrying weapon on school grounds, terroristic threats, reckless conduct, possession of gun during commission of a crime, and disrupting public school".

He is a social studies teacher employed at the school since 2004 and the announcer for the school football team, according to Dalton police.

According to local media, police reports indicate that in March 2016 Mr Davidson tried to confess to having someone killed.

Police took him to hospital because he was expressing suicidal thoughts, but could find no evidence of his involvement in any murder.

Then in January last year he abruptly left the school campus and was later found by police sitting on a kerb about one mile from the school.

He was again taken to hospital after he was "unable or unwilling to respond to police", according to the report.

Investigators say a note was found on 21 February at the high school mentioning a threat against the building the following day, but it is unclear if that is related to Wednesday's incident.

"It is really serious after so many things have happened all over the country," student Ricardo Perez told television station WTVC after the incident.

"I'm shocked, I can't believe it. I thought it was a dream."

One Dalton student tweeted at the National Rifle Association to argue that giving teachers guns is a bad idea.