In the summer of 1864, Robert E. Lee sent his Second Corps under Lt. Gen. Jubal Early to the Shenandoah Valley to shift Union resources from the Richmond front. After Early won several battles, Lt. Gen. Ulysses S. Grant appointed Maj. Gen. Philip Sheridan to command in the Valley. The two armies maneuvered through August and into September. On September 19, Sheridan finally attacked Early at Winchester. The battle ended in a Union victory and paved the way for Federal control of the Valley.