Republican presidential candidate Jeb Bush canceled a scheduled appearance in South Carolina following the mass shooting that took place in a historic African-American church in Charleston Wednesday night.

The shooting occurred after a white male, identified as 21-year-old Dylann Roof, walked into the Emanuel African Methodist Episcopal Church around 8 p.m., where a Bible study was taking place, reports WLTX. He then opened fire around 9 p.m. while the church members were praying. Altogether nine people were killed, including the church's pastor, state Sen. Clementa Pinckney, 41. Three people survived.

Though Roof fled the scene of the shooting, he was later arrested in Shelby, North Carolina, almost a 4-hour drive away, Attorney General Loretta Lynch confirmed in a press conference. 

The rest of the victims were identified by the Charleston County coroner in a press conference. They are Suzy Jackson, 87, Rev. Daniel Simmons, Jr., 74, Rev. Depayne Middleton, Myra Thompson, Tywanza Sanders, Cynthia Hurd, and Rev. Sharonda Coleman-Singleton. 

The shooting prompted Bush, who officially launched his campaign in the 2016 race on Monday, to cancel his Thursday morning appearance at the Charleston Maritime Center. Bush was supposed to attend a town hall with veterans at the center, which is located just blocks away from the church.

"Due to the tragic events unfolding in South Carolina tonight, Governor Bush is canceling tomorrow's events in Charleston. Governor Bush's thoughts and prayers are with the individuals and families affected by this tragedy," said a campaign spokeswoman in a statement released late Wednesday, according to CBS News.

Democratic presidential frontrunner Hillary Clinton, who was in Charleston earlier that day for a fundraiser about a mile away from the Emanuel AME Church, also released a statement about the shooting, reports The Post and Courier.

"Heartbreaking news from Charleston -- my thought and prayers are with you all," she tweeted.

Republican Sen. Lindsey Graham of South Carolina, who is also in the running to become the next president, talked about the shooting on ABC's "The View" Thursday.

When asked what steps should be taken to pass legislation that would prevent another shooting, Graham replied, "I bet there were some indicators early on that this guy was not quite there. Just being able to track people -- put them into systems where they can be deterred or stopped. But it's very complicated in a nation of 300 million people where you have freedom of movement and freedom of thought. 300 million of us and unfortunately every now and then, something like this happens. And we'll see."