Maj. Gen. John Pope was placed in command of the newly constituted Army of Virginia on June 26. Gen. Robert E. Lee responded to Pope’s dispositions by dispatching Maj. Gen. T.J. Jackson with 14,000 men to Gordonsville in July. Jackson was later reinforced by A.P. Hill’s division. In early August, Pope marched his forces south into Culpeper County with the objective of capturing the rail junction at Gordonsville. On August 9, Jackson and Maj. Gen. Nathaniel Banks’s corps tangled at Cedar Mountain with the Federals gaining an early advantage. A Confederate counterattack led by A.P. Hill repulsed the Federals and won the day. Confederate general Charles Winder was killed. This battle shifted fighting in Virginia from the Peninsula to Northern Virginia, giving Lee the initiative.