Maj. Gen. J.E.B. Stuart's cavalry, which was riding north to get around the Union army, attacked a Union cavalry regiment, driving it through the streets of Hanover. Brig. Gen. Farnsworth's brigade arrived and counterattacked, routing the Confederate vanguard and nearly capturing Stuart himself. Stuart counterattacked. Reinforced by Brig. Gen. George A. Custer's brigade, Farnsworth held his ground, and a stalemate ensued. Stuart was forced to continue north and east to get around the Union cavalry, further delaying his attempt to rejoin Lee's army which was then concentrating at Cashtown Gap west of Gettysburg.