The bullet entered and exited Ferguson-Montgomery's leg, and she was taken to Intermountain Medical Center, where she was listed in good condition later Thursday. Horsley confirmed that she had been released from the hospital as of Thursday afternoon and is taking the rest of the week off.
She has taught at Westbrook Elementary for 14 years.
"Student safety is our primary concern and we are grateful that the injuries sustained by this teacher are not life threatening and that no students or other faculty were injured," the district said in a written statement.
Granite School District police are still investigating how the handgun discharged.
He said several faculty members went to the restroom after hearing the gunshot and came to Ferguson-Montgomery's aid.
Although no other faculty or students witnessed the shooting, they might have heard the gunshot or seen the teacher as she was taken out of the school to the hospital, Horsley said.
Crisis counselors were available and a substitute was brought in for the teacher's class, though Horsley declined to say which grade she teaches.
"Counselors will work with teachers on how to share this information with kids and how to answer questions," the district said in its statement. "We encourage parents to have similar conversations with their child as appropriate. We will provide these resources as long as necessary."
Classes proceeded fairly normally, Horsley said, but a handful of parents pulled their children out of school, following the incident, Horsley added.
The teacher a concealed carry permit holder was allowed to have the weapon on campus per state law, Horsley said.
Utah is among the few states that allow people with concealed weapon permits to carry guns in public schools, according to the National Conference of State Legislatures.
Educators have said they have no way of determining how many Utah teachers are armed, but gun-rights advocates have estimated that 1 percent, or about 240 teachers in the state, are licensed to carry weapons.
Utah teachers are allowed to carry guns, but the weapons must be completely concealed and kept with the teacher at all times, including inside a bathroom stall, according to the state office of education. However, teachers are not required to tell the school that they have a gun.
"This would clearly violate the intent and the strategic advantage of the 'concealed' weapon," the district's statement reads. "If a permit holder had disclosed to faculty or staff that they were carrying a weapon, this could make them a target in an active shooter situation."
Teachers and staff without a concealed carry permit can still bring a gun to school if an administrator approves, if they happen to live on school property or if they work in law enforcement.
In 2003, the Utah Legislature amended a law banning "dangerous" weapons from schools. It also reinforced an existing statute that says owners of legally concealed weapons can carry their guns "without restriction," except in large airports, prisons, jails and courtrooms.
Then-Gov. Mike Leavitt, a vocal opponent of guns in schools and churches, told The Salt Lake Tribune in 2003 that he had almost no choice but to sign on the dotted line. Even if he vetoed the amendment, "guns would still be allowed in schools because the existing statute still exists," Leavitt said at the time.
The Associated Press contributed to this story.