A gunman opened fire during a Bible study class at a historic church in Charleston, S.C.Wednesday evening, killing 9 people, including the church's pastor, the Rev. Clementa Pinckney. Six of the victims were female and three were male, CNN reports. Officials are calling the shooting, which took place at Emanuel African Methodist Episcopal Church, a hate crime.

Police arrested Dylann Roof, a 21-year-old white man from Lexington, S.C., on Thursday in connection with the attack, CNN reports. Law enforcement officials told CNN that Roof said he was at the church "to shoot black people" before he began firing with a handgun.

Roof's uncle told Reuters earlier in the day that he had recognized his nephew from surveillance photos police released, and said that Dylan had recently been given a new gun for his 21st birthday. Roof remained at large until shortly before noon on Thursday. Police said he was at the church for about an hour, meeting with his eventual victims, before opening fire.

Add new fall shows to your Watchlist

Emanuel African Methodist Episcopal Church was built in 1816 and is the largest African-American church in Charleston. It has been rebuilt several times after being destroyed by a fire and an earthquake.

Wednesday Bible study is a weekly occurrence in the church's basement, according to CNN. Three people survived the shooting. Eight of the victims died at the scene, and a ninth died after being taken to a nearby hospital. Police were called to the scene shortly after 9 p.m.

Republican presidential candidate Jeb Bush was scheduled to participate in a town hall in Charleston on Thursday, but canceled the event in the wake of the shooting.