After Confederate Gen. Robert E. Lee’s victory at Chancellorsville in May 1863, he led the Army of Northern Virginia to the Shenandoah Valley, then through Maryland into Pennsylvania, while Union General George G. Meade, who replaced Gen. Joseph Hooker on June 28, led the Army of the Potomac in pursuit and Confederate cavalry commander Gen. J.E.B. Stuart cut Federal communications, rail lines, and captured supplies before the armies collided at Gettysburg on July 1 and the defeated Confederates retreated into Virginia on July 14. On the morning of Friday, June 19, 1863, fighting at Middleburg drove Confederate defenders from the town to the prominent ridge at Mount Defiance, where the Battle of Middleburg centered as part of the cavalry engagements at Aldie, Middleburg, and Upperville. The action took place while Lee’s infantry marched north beyond the Blue Ridge, with some already across the Potomac into Maryland and Gen. James Longstreet’s men moving along the mountains’ eastern edge to catch up. The engagement occurred as Stuart’s cavalry blocked Union efforts to locate and attack Lee’s infantry. Two days earlier, on June 17, intense fighting at Aldie had seen Stuart’s men stop Union Gen. Alfred Pleasonton’s repeated attempts to push west across the Loudoun Valley toward the Blue Ridge, and on that same day Confederate guerrilla leader Maj. John Singleton Mosby captured Pleasonton’s orders for the coming week, enabling Stuart to counter his opponent here and later around Upperville until Lee’s infantrymen were safely across the river.