<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 Battle of Gettysburg (locally / ˈɡɛtɪsbɜːrɡ / (listen), with an / s / sound) was fought July 1--3, 1863, in and around the town of Gettysburg, Pennsylvania, by Union and Confederate forces during the American Civil War . The battle involved the largest number of casualties of the entire war and is often described as the war's turning point . Union Maj. Gen. George Meade's Army of the Potomac defeated attacks by Confederate Gen. Robert E. Lee's Army of Northern Virginia, halting Lee's invasion of the North . </P> <P> After his success at Chancellorsville in Virginia in May 1863, Lee led his army through the Shenandoah Valley to begin his second invasion of the North--the Gettysburg Campaign . With his army in high spirits, Lee intended to shift the focus of the summer campaign from war - ravaged northern Virginia and hoped to influence Northern politicians to give up their prosecution of the war by penetrating as far as Harrisburg, Pennsylvania, or even Philadelphia . Prodded by President Abraham Lincoln, Maj. Gen. Joseph Hooker moved his army in pursuit, but was relieved of command just three days before the battle and replaced by Meade . </P>

Who won the battle of gettysburg during the civil war