On the ridge west of Waynesboro, Confederate forces commanded by Lt. Gen. Jubal A. Early fought their last engagement. Portions of Maj. Gen. Philip H. Sheridan's army, including cavalry led by Maj. Gen. George A. Custer, attacked and routed Confederate troops under Brig. Gen. Gabriel C. Wharton. Early and the remnants of his army retreated, leaving Sheridan in control and ending the Shenandoah Valley campaigns.