Lee's invasion of the North had been quite successful prior to Gettysburg, and the Confederates had gained confidence with each victory. After Chancellorsville, Lee moved north with the hopes of bringing the Union army out to a decisive battle that would ruin civilian support for the war in the North. He eventually hoped to move on Harrisburg and Philadelphia but the Union army under a hastily appointed General Meade met him in Gettysburg and the three-day battle there left the Confederate Army in terrible shape and headed back south. Both sides suffered nearly 23,000 casualties but the Confederates were far less able to absorb the losses in men and supplies.
The battle at Vicksburg was the conclusion of U.S. Grant's campaign to sieze control of the Mississippi River by taking all the forts along it and thereby strangling Confederate supply lines and cutting the South in two. The battle was a major victory for the Union forces and combined with the defeat at Gettysburg, which occurred on the previous day, spelled doom for the Confederacy though the war would drag on for some time after.