CHARLESTON, S.C. — Gov. Nikki R. Haley was at home in Columbia last Wednesday night, when the gunman began shooting and killing inside the historic black church here.

At first, she had only partial information, but eventually learned it had happened at Emanuel African Methodist Episcopal Church, where State Senator Clementa C. Pinckney, a Democrat she considered a friendly adversary, presided as pastor.

She called and left Mr. Pinckney a voice mail message, unaware that he was one of the nine victims of a gunman who witnesses said was motivated by racial hatred.

By Saturday morning, calls were mounting for the Legislature to remove what many consider the state’s most visible symbol of racial animus: the Confederate battle flag, which has flown on the grounds of the State House since 1962. Ms. Haley, a Republican who is the first ethnic minority and first woman to serve as governor of South Carolina, decided to reverse her previous position and tell lawmakers they needed to remove the flag once and for all.