One of the first battles of the war was fought in Virginia. The First Battle of Bull Run, on July 21, 1861, was a Confederate victory. The Union Army of the Potomac then tried to capture Richmond in the Peninsula Campaign during the spring of 1862, but Robert E. Lee became leader of the Army of Northern Virginia and defeated the Union Army. He then won the Second Battle of Bull Run in August 1862. Lee tried to win the war by invading Maryland, but he lost the Battle of Antietam and retreated to Virginia.