In the autumn of 1864, Maj. Gen. Philip Sheridan and Lt. Gen. Jubal Early engaged in a campaign for control of Virginia's Shenandoah Valley. Sheridan defeated Early at Third Winchester, Fisher's Hill and Tom's Brook. Undeterred, Early attacked Sheridan on October 19 at Cedar Creek, just south of Middletown. Early drove back two of Sheridan's corps but that afternoon the Federals rallied. The ensuing counterattack routed the Confederates and gave full control of the Valley to Union forces.