Robert Edward Lee (January 19, 1807 – October 12, 1870) was a Confederate general during the American Civil War, towards the end of which he was appointed the overall commander of the Confederate States Army. He led the Army of Northern Virginia—the Confederacy's most powerful army—from 1862 until its surrender in 1865, earning a reputation as a skilled tactician. A son of Revolutionary War officer Henry "Light Horse Harry" Lee III, Lee was a top graduate of the United States Military Academy and an exceptional officer and military engineer in the United States Army for 32 years. He served across the United States, distinguished himself extensively during the Mexican–American War, and was Superintendent of the United States Military Academy. He married Mary Anna Custis Lee, great-granddaughter of George Washington's wife Martha. While he opposed slavery from a philosophical perspective, he supported its legality and held hundreds of slaves. When Virginia declared secession from the Union in 1861, Lee chose to follow his home state, despite his desire for the country to remain intact and an offer of a senior Union command. During the first year of the Civil War, he served in minor combat operations and as a senior military adviser to Confederate President Jefferson Davis. Lee took command of the Army of Northern Virginia in June 1862 during the Peninsula Campaign following the wounding of Joseph E. Johnston. He succeeded in driving the Union Army of the Potomac under George B. McClellan away from the Confederate capital of Richmond during the Seven Days Battles, although he was unable to destroy McClellan's army. Lee then overcame Union forces under John Pope at the Second Battle of Bull Run in August. His invasion of Maryland that September ended with the inconclusive Battle of Antietam, after which he retreated to Virginia. Lee won two of his most decisive victories at Fredericksburg and Chancellorsville before launching a second invasion of the North in the summer of 1863, where he was decisively defeated at the Battle of Gettysburg by the Army of the Potomac under George Meade. He led his army in the minor and inconclusive Bristoe Campaign that fall before General Ulysses S. Grant took command of Union armies in the spring of 1864. Grant engaged Lee's army in bloody but inconclusive battles at the Wilderness and Spotsylvania before the lengthy Siege of Petersburg, which was followed in April 1865 by the capture