A protester climbed a 30-foot flagpole and removed the Confederate battle flag from its perch outside the South Carolina State House early Saturday, before she was arrested and the flag replaced, the police said.

The protester, an African-American woman, was nearly halfway up the pole when a State Capitol police officer on routine patrol ordered her to come down. The authorities said the woman, who was wearing climbing gear, had ignored the command.

She continued her climb to the top of the flagpole and unhooked and removed the flag before descending.