 Complete the following phrase:  In March 1861, Ferguson was commissioned a captain in the South Carolina militia, afterwards being appointed Lieutet and aide-de-camp to C.S. Army Brigadier-General P. G. T. Beauregard. He was one of the officers who received the formal surrender of U.S. Army Major Robert Anderson at Fort Sumter, raised the first Confederate States flag, and posted the first guards at Fort Sumter. After the siege, he was sent to present the first Confederate flag struck by enemy shot to the Provisional Congress of the Confederate States. He was a lieutet-colonel and aide-de-camp to General Beauregard during the Battle of Shiloh. During the 