On June 30, 1863, as Confederates pushed toward the railroad tracks on Abbottstown Road, the Union regrouped for fierce counterattacks in town. Major John Hammond re-formed the 5th New York Cavalry in the Commons near the old rail depot and led 400 cavalrymen through side streets to ambush Confederates on Hanover Square, charging with drawn sabers. At the same time, the newly appointed 24-year-old General Elon Farnsworth ordered troops of the 1st Vermont and 1st West Virginia into action, while companies of the 18th Pennsylvania regrouped and joined the counterattacks. Along alleys and streets, Farnsworth and Hammond launched a sudden onslaught that liberated the Square and drove Confederates back down Frederick Street and into side streets and surrounding fields. Debris, dead horses, and fallen soldiers littered the downtown. After hearing artillery at the opening of the battle, General H. Judson Kilpatrick raced about six miles from near Abbottstown back to town to help block any further Confederate advance. As the Union secured the square, Kilpatrick ordered troops, aided by citizens, to barricade streets with barrels, farm wagons, dry goods boxes, and other materials for cover. In the afternoon he established his headquarters at the Central Hotel on the square and remained there that night. After a prolonged afternoon standoff, around 2 p.m., General J.E.B. Stuart's Confederate forces withdrew south from town through backroads and farms to Fuhrman Mill Road before heading east to Jefferson, York New Salem, Dover, and ultimately north to Carlisle, 30 miles from Gettysburg.