<Li> Retreat from Gettysburg <Ul> <Li> Fairfield </Li> <Li> Monterey </Li> <Li> Williamsport </Li> <Li> Boonsboro </Li> <Li> Funkstown </Li> <Li> Manassas Gap </Li> </Ul> </Li> <Ul> <Li> Fairfield </Li> <Li> Monterey </Li> <Li> Williamsport </Li> <Li> Boonsboro </Li> <Li> Funkstown </Li> <Li> Manassas Gap </Li> </Ul> <P> The Gettysburg Campaign was a military invasion of Pennsylvania by the main Confederate army under General Robert E. Lee in summer 1863 . The Union won a decisive victory at Gettysburg July 1--3, with heavy casualties on both sides . Lee managed to escape back to Virginia with most of his army . It was a turning point in the American Civil War, with Lee increasingly pushed back toward Richmond until his surrender in April 1865 . After his victory in the Battle of Chancellorsville, Lee's Army of Northern Virginia moved north for a massive raid designed to obtain desperately needed supplies, to undermine civilian morale in the North, and to encourage anti-war elements . The Union Army of the Potomac was commanded by Maj. Gen. Joseph Hooker and then (from June 28) by Maj. Gen. George G. Meade . </P> <P> Lee's army slipped away from Federal contact at Fredericksburg, Virginia, on June 3, 1863 . The largest predominantly cavalry battle of the war was fought at Brandy Station on June 9 . The Confederates crossed the Blue Ridge Mountains and moved north through the Shenandoah Valley, capturing the Union garrison at Winchester, Virginia, in the Second Battle of Winchester, June 13--15 . Crossing the Potomac River, Lee's Second Corps advanced through Maryland and Pennsylvania, reaching the Susquehanna River and threatening the state capital of Harrisburg . However, the Army of the Potomac was in pursuit and had reached Frederick, Maryland, before Lee realized his opponent had crossed the Potomac. Lee moved swiftly to concentrate his army around the crossroads town of Gettysburg . </P>

What general led the confederate army into pennsylvania