The Battle of Hanover took place on June 30, 1863, in Hanover in York County, Pennsylvania, as part of the Gettysburg Campaign of the American Civil War.
Maj. Gen. J.E.B. Stuart's Confederate cavalry, which was riding north to get around the Union Army of the Potomac, attacked a Federal cavalry regiment, driving it through the streets of Hanover. Brig. Gen. Elon Farnsworth's brigade arrived and counterattacked, routing the Confederate vanguard and nearly capturing Stuart himself. Stuart soon counterattacked. Reinforced by Brig. Gen. George A. Custer's Michigan 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 Robert E. Lee's army, which was then concentrating at Cashtown Gap west of Gettysburg.