In June 1863, Lee launched his most ambitious plan of the war. He and his Army of Northern Virginia invaded the North for a second time. His first invasion ended at the Battle of Antietam in September 1862. This time he wanted to take the war out of Virginia and bring it into the Northern states. Virginia had been ravaged by war and Lee's army could no longer find food and supplies. He also wanted to defeat the Army of the Potomac on its own soil. This would demoralize the North and possibly bring an end to the war. However, his defeat at the Battle of Gettysburg ended heavy losses. The south lost 22,198 soldiers (killed, wounded, captured or missing). Lee took what supplies his army had taken from the Pennsylvania countryside and turned south for the safety of Virginia.