Maj. Gen. John Pope was placed in command of the newly-constituted Army of Virginia on June 26th. Pope's orders were to defend Washington DC and Union-held northern Virginia while the Army of the Potomac under Maj. Gen. George B. McClellan battled Robert E. Lee outside of Richmond. When McClellan was defeated at the end of the Seven Days battles less than a week later, Lee turned his attention north toward Pope while McClellan regrouped his army. Pope's three army corps were arrayed in a line from the Blue Ridge Mountains to the Rappahannock River. Lee responded to Pope’s dispositions by dispatching Maj. Gen. Thomas J. "Stonewall" Jackson with 14,000 men to Gordonsville towards the center of Pope's line. Jackson was later reinforced by Maj. Gen. A.P. Hill’s division. On August 6th, Pope marched his forces south into Culpeper County with the objective of capturing the rail junction at Gordonsville. On August 9th, Jackson and Maj. Gen. Nathaniel Banks’s Second Corps of Pope's army tangled at Cedar Mountain with the Federals gaining an early advantage. A Confederate counterattack led by Hill on the Union right repulsed the Federals and won the day. Confederate Brig. Gen. Charles Winder was killed. The battle at Cedar Mountain shifted fighting in Virginia from the Peninsula to Northern Virginia, giving Lee the strategic initiative.