As his Army of Northern Virginia advanced into Maryland in early September 1862, General Robert E. Lee made plans to capture the vital Union garrison at Harpers Ferry in the rear of his invading force. Although Maj. Gen. George McClellan's Army of the Potomac was in pursuit, Lee divided his army, sending three columns under Gen. Thomas “Stonewall” Jackson to Harpers Ferry while the rest of the army marched towards Hagerstown, Maryland. Surrounded on three sides by steep heights, the terrain surrounding the town made it nearly impossible to defend, a problem made worse by the Union commander, Colonel Dixon S. Miles, who lacked experience leading troops. For three days, Jackson placed artillery on the heights above Harpers Ferry, and on the morning of September 15 ordered an artillery barrage that bombarded the town, followed by an infantry assault by Maj. Gen. A. P. Hill's division. As surrender was debated, Miles was struck by a shell that shattered his left leg, a wound that proved fatal. Jackson took possession of Harpers Ferry before joining the rest of Lee’s army at Sharpsburg, leaving Hill’s division to process the parole of 12,000 prisoners.