The 2nd Confederete invasion of Northern soil began on June 3rd when part of Gen. Robert E. Lee's Confederate army abandoned their lines near Fredericksburg, Virginia. Six days later Union cavalry, seeking intelligence, attacked and nearly defeated Stuart at Brandy Station. As both armies marched northward, the cavalry opponents dueled in classic engagements at Aldie, Middleberg, and Upperville on June 18-21st. On the 22nd, Lee gave Stuart vague, discrtionary orders permitting Stuart to harass the Union infantry and directing him to guard the army's right flank, remain in communication, and gather supplies. On the 24th, Stuart prepared to ride around the Federals in an undertaking similar to the one he had accomplished brilliantly a year before on the Peninsula.
At 1:00 A.M. on the 25th, Stuart, with 3 brigades, rode eastward in the darkness toward the Bull Run Mountains. Encountering Union infantry marching east of the mountains, the Confederates halted for the night. On the 26th, Stuart detoured widely around the passing Federals, covering 23 miles. The next day, in the saddle early again, the Confederates reached Fairfax Court House, routed a few Union cavalrymen, then rested for several hours. Resuming the weary march on the 27th, Stuart shoved his brigades across the Potomac River late that day, hours behind schedule. The 28th brought no restas the Confederates moved across Maryland. At Rockville, he attacked and captured 125 wagons, an encumbrance that only slowed down the march.
His men rode all night toward Pennsylvania, burdened with prisoners and wagons. Halting near Hood's Mill, Maryland, they wrecked rails of the Baltimore & Ohio Railroad and waited for approaching trains. About noon, Stuart moved toward Westminister, where his men were suddenly attacked by Union cavalry. The Confederates repulsed the Federals, fed their horses, and gathered a little sleep. Before 10:00 A.M. on the 30th, they entered Hanover, Pennsylvania, and within minutes a Union brigade charged them. A savage battle ensued with the Confederates repulsing the Federals. Stuart pushed his men all night again before halting at Dover.
On the morning of the 1st, he rested the command for several hours. To the southwest, Lee's army, having received no information from Stuart about the location of the Union army, stumbled into battle at Gettysburg. Later on the 1st, an army messenger found Stuart. On the afternoon of the 2nd, the cavalry commander, riding ahead of his brigaeds, reported to Lee at Gettysburg. Lee, according to tradition, said "Well, Gen. Stuart, you are here at last".