Answer
Pierre Gustave Toutant Beauregard graduated from the United States Military Academy at West Point in 1838, ranking 23rd in his class. Beauregard then served in the United States Army for six years, seeing action in the Seminole Wars and the Mexican–American War. After leaving the army in 1846, Beauregard worked as a civil engineer and surveyor before becoming involved in the Confederate States of America during the American Civil War.