On the afternoon of July 5th, 1863, Federal cavalry defended Smithsburg from attack by General J.E.B. Stuart’s Confederate cavalry as the retreat from Gettysburg began. At dark, U.S. General Judson Kilpatrick’s cavalry withdrew to Boonsboro, and Stuart camped at Leitersburg.