Hoping to gain European recognition by winning a major victory in Union territory, Robert E. Lee and the Army of Northern Virginia invaded Maryland. The Confederate threat was met by the Army of the Potomac, under the leadership of General George MacClellan.