After invading Maryland in September 1862, Gen. Robert E. Lee divided his army to march on and invest Harpers Ferry. The Army of the Potomac under Maj. Gen. George B. McClellan pursued the Confederates to Frederick, Maryland, then advanced on South Mountain. On September 14, pitched battles were fought for possession of the South Mountain passes: Crampton's, Turner's, and Fox's Gaps. By dusk the Confederate defenders were driven back, suffering severe casualties, and McClellan was in position to destroy Lee's army before it could reconcentrate. McClellan's limited activity on September 15 after his victory at South Mountain, however, condemned the garrison at Harpers Ferry to capture and gave Lee time to unite his scattered divisions at Sharpsburg. Union general Jesse Reno and Confederate general Samuel Garland, Jr., were killed at South Mountain.