The Second Battle of Kernstown was fought on July 24, 1864, at Kernstown, Virginia, outside Winchester, Virginia, as part of the Valley Campaigns of 1864 in the American Civil War. The Confederate Army of the Valley under Lt. Gen. Jubal A. Early soundly defeated the Union Army of West Virginia under Brig. Gen. George Crook and drove it from the Shenandoah Valley back over the Potomac River into Maryland. As a result, Early was able to launch the Confederacy's last major raid into northern Union territory, attacking the Baltimore and Ohio Railroad in Maryland and West Virginia and burning Chambersburg, Pennsylvania, in retaliation for the burning of civilian houses and farms earlier in the campaign. Background On July 19, following a series of unsuccessful Union attacks on his flanks, General Early decided to withdraw from his precarious position at Berryville to a more secure position near Strasburg. During the evacuation of the military hospitals and storage depots at Winchester, Union forces under Brig. Gen. William W. Averell won a rare victory over Confederate forces under Maj. Gen. Stephen D. Ramseur at the Battle of Rutherford's Farm. The poor Confederate performance at the battle, as well as a series of small cavalry engagements south of Winchester the following day led Union commanders George Crook and Horatio G. Wright to conclude the Confederates were merely fighting a rearguard action and that Early was leaving the Valley and heading for Richmond to reinforce the Army of Northern Virginia. With the threat to Washington, D.C., seemingly over, Wright withdrew the VI Corps and XIX Corps from the valley to return to the aid of Ulysses S. Grant's siege of Petersburg, Virginia, on July 20, leaving only the three-division strong Army of West Virginia in the Valley. The following two days were relatively quiet with both armies resting in their camps some from each other. On July 23, Confederate cavalry attacked the Union advanced picket line at Kernstown, leading to a sharp cavalry skirmish. From prisoners caught in the skirmish Early learned of Wright's departure. In order to continue to be of service to Lee in the Valley, Early realized he had to attack the diminished force in front of him to ensure that Grant's force at Petersburg would not be reinforced. Opposing forces Union Confederate Battle On the morning of July 24, Early marched his army north against Crook. Confederate cavalry encountered its Union