A student at Gainesville High School has been planning an attack at the Episcopal Church in Bethel, Africa, for several weeks.
She has taken significant steps, including researching black churches online and visiting Bethel AME once this month, police chief. Jay Parrish said. No one was in the church then, he said.
A student overheard a teenager talking about an alleged threat on Friday and alerting a school administrator who in turn notified a school resource officer, Paris said.
The teenager was taken into custody. She is facing a criminal attempt to commit murder, police said.
"I have no doubt that we thwarted an attack that would have been ugly," Perish said.
The teenager is targeting Bethel AME because of its African parishioners and small congregation, said a police chief.
"I know she did a lot of internet research on what she wanted to do," Parrish said. "I think she also wanted fame by looking for African-American churches."
He said that although there are several black churches in Gainesville, "he somehow landed it on this one and that is the purpose."
Police notified the Betel AME pastor after learning of the alleged plot.
The chief said it was "divine intervention" that no one was in the church when the teenager attended it. He believes she had the knives with her.
Police believe the girl acted alone. No other church is threatened, Perish said.
School Superintendent Jeremy Williams says, "A single student act does not represent the views and beliefs of Gainesville's urban school system."
"As a school system that celebrates our diversity, we are beyond stunned by the recent development. However, we are extremely proud that our students are alerting the school administration to a possible off-campus threat," he said.
The teenager's plans were very detailed, the chief said.
"I am very worried that anyone would feel this way and would take these significant steps to attack an innocent, pious person in church, one of the most sacred things our society has left," he said Parrish.
Perish, a native of Gainesville, said the alleged plot was "contrary to who we are."
"I've been in this community all my life and it's not a representation for us," he said.
Nick Valencia and Pam Kirkland report from Gainesville, while Darran Simon reports and writes in Atlanta. CNN's Amanda Watts contributed to this report.