DALTON, Ga. - The teacher accused of shooting a gun while inside a high school is being granted bond to get evaluated at a mental health facility.

A judge signed off on the $10,000 for Randal Davidson on Thursday morning after Dalton Public Schools, students and parent representatives, the D.A.'s Office and Davidson's attorney reached an agreement.

The terms of the order will allow Davidson to be placed on an electronic ankle monitor prior to leaving Whitfield County Jail, after which he will be accompanied and transported to Hamilton Medical Center Emergency Room where representatives from Westcott Behavioral Health services will perform an initial evaluation.

Once the evaluation is complete, Davidson will either be referred to Westcott Behavioral Health or to another facility where he will undergo further psychiatric evaluation.

Those results will then be reported to the Court.

Davidson will also have to surrender any and all firearms that are in his possession and consent to a search of his residence to secure any other firearms he may own. He will be prohibited from going on any school property or have any contact with school employees, students or immediate families of students.

Davidson, a 53-year-old social studies teacher, allegedly barricaded himself in a classroom on Feb. 28, not allowing students to enter. When the principal came to attempt to unlock the door, a shot was fired.

RELATED: Who is Randal Davidson, the Dalton teacher arrested for shooting a gun in school?

As Thursday morning morning, Davidson was still in custody at Whitfield Co. Jail and will remain in their custody until arrangements are made between jail staff, the electronic monitory company and Westcott.

PHOTOS | Dalton High School shooting scene

RELATED |