American Battlefield Trust's map of the Battle of Upperville
On June 21, General David M. Gregg’s Union cavalry division made a determined effort to pierce the Confederates’ cavalry screen in the vicinity of Ashby’s Gap. Two brigades of General Jeb Stuart’s Confederate cavalry under General Wade Hampton and General Beverly Robertson made a stand at Goose Creek, west of Middleburg, and beat back Gregg’s division only to be flanked by a brigade of Federal infantry under Colonel Strong Vincent. Stuart’s men withdrew to Upperville. General John Buford’s Federal column detoured to attack the Confederate left flank there but encountered General William E. “Grumble” Jones’s and General John R. Chambliss’s brigades. Meanwhile Colonel J.I. Gregg’s and General H. Judson Kilpatrick’s Union brigades advanced on the Upperville from the east along the Little River Turnpike. After furious mounted fighting, Stuart withdrew to take a strong defensive position in Ashby Gap, even as Confederate infantry crossed the Potomac into Maryland. As cavalry skirmishing diminished, Stuart made the fateful decision to strike east and make a circuit of the Union army as it marched toward Gettysburg.