The Battle of Middleburg took place from June 17 to June 19, 1863, in Loudoun County, Virginia, as part of the Gettysburg Campaign of the American Civil War.
Confederate Maj. Gen. J.E.B. Stuart, screening Robert E. Lee’s invasion route, sparred with Maj. Gen. Alfred Pleasonton's Union cavalry. On June 17, Col. Alfred Napoleon Duffié's isolated 1st Rhode Island Cavalry Regiment was attacked by the brigades of Thomas T. Munford and Beverly Robertson. The 1st Rhode Island was routed, taking about 250 casualties. On June 19, J. Irvin Gregg's brigade advanced, driving Stuart's cavalry one mile beyond the town. Both sides were reinforced, and mounted and dismounted skirmishing continued. Stuart was gradually levered out of his position but fell back to a second ridge, still covering the approaches to the Blue Ridge gap.