While Vicksburg was falling, Union Maj. Gen. William S. Rosecrans was advancing against Bragg in Tennessee, forcing him to evacuate Chattanooga. Bragg achieved a significant victory against Rosecrans in the Battle of Chickamauga (September 19–20), but he was defeated by Ulysses S. Grant in the Battles for Chattanooga in November. Bragg resigned from his command of the Army of Tennessee and returned to Richmond in the role as military adviser to the president. Davis offered the position to William J. Hardee, the senior corps commander, who refused it. He considered P.G.T. Beauregard, another general with whom he had poor personal relations, and also Robert E. Lee. Lee, who was reluctant to leave Virginia, first recommended Beauregard, but sensing Davis's discomfort, changed his recommendation to Johnston. After much agonizing, Davis appointed Johnston to command the Army of Tennessee in Dalton, Georgia, on December 27, 1863.