During the Maryland Campaign of 1862, Robert E. Lee's Army of Northern Virginia advanced north through the Shenandoah Valley into Maryland. Lee planned to capture the garrison at Harpers Ferry to secure his line of supply back to Virginia. The Confederate Army was being pursued at a leisurely pace by Maj. Gen. George B. McClellan's Army of the Potomac. Even though the Union Army outnumbering him more than two to one, Lee chose the risky strategy of dividing his army. He sent one portion to converge and attack Harpers Ferry from three directions. Col. Dixon S. Miles, Union commander at Harpers Ferry, insisted on keeping most of the troops near the town instead of taking up commanding positions on the surrounding heights. He had been ordered by McClellan to hold the town until McClellan could send more soldiers.