The VIII Corps played a major part in the defense of Washington from Jubal Early at Monocacy on July 9, 1864 under the commander of Maj. Gen. Lew Wallace. The primary duty of the VIII Corps in 1864 was rear echelon duties in Maryland guarding the Baltimore and Ohio Railroad. Elements of the corps also battled Confederate cavalry as it raided across Maryland to the suburbs of Baltimore during Early's Raid on Washington. The headquarters of the department was located in Baltimore.