In 1860, South Carolina became the first state to secede from the United States. As more states followed suit and the Confederate States of America took shape, many federal installations in the South were taken over by state governments. Fort Sumter, in the harbor of Charleston, South Carolina, continued to fly the U.S. flag, even as Confederate forces surrounded it. Lincoln decided to resupply the fort but not reinforce it, unless resistance was met. After negotiations failed, the first shot was fired in the pre-dawn hours of April 12, 1861. Over the next 34 hours approximately 40,000 shells, many of them incendiary, landed on the fort, setting fire to its interior buildings and casements. Unable to mount an effective defense, the commander of the Fort Sumter garrison, Major Robert Anderson, surrendered with the honors of war.