The troops drew near Pumpkinvine Creek, where they attacked and drove the Confederates from Dallas, Georgia, even before Sherman's order to do so. Johnston and Sherman maneuvered against each other, until the Union tactical defeat at the Battle of Kennesaw Mountain. McPherson then tried a flanking maneuver at the Battle of Marietta, but that failed as well. Confederate President Jefferson Davis became frustrated with Johnston's strategy of maneuver and retreat, and on July 17 replaced him with Lt. Gen. John Bell Hood. With the Union armies closing in on Atlanta, Hood first attacked George Henry Thomas's Army of the Cumberland north of the city on July 20, at Peachtree Creek, hoping to drive Thomas back before other forces could come to his aid. The attack failed. Then Hood's cavalry reported that the left flank of McPherson's Army of the Tennessee, east of Atlanta, was unprotected. Hood visualized a glorious replay of Jackson's famous flank attack at Chancellorsville and ordered a new attack. McPherson had advanced his troops into Decatur, Georgia, and from there, they moved onto high ground on Bald Hill overlooking Atlanta. Sherman believed that the Confederates had been defeated and were evacuating; however, McPherson rightly believed that they were moving to attack the Union left and rear. On July 22, while they were discussing this new development, however, four Confederate divisions under Lt. Gen. William J. Hardee flanked Union Maj. Gen. Grenville Dodge's XVI Corps. While McPherson was riding his horse toward his old XVII Corps, a line of Confederate skirmishers appeared, yelling "Halt!". McPherson raised his hand to his head as if to remove his hat, but suddenly wheeled his horse, attempting to escape. The Confederates opened fire and mortally wounded McPherson in the back. When the Confederate troops approached and asked his orderly who the downed officer was, the aide replied "Sir, it is General McPherson. You have killed the best man in our army." This was early in the one-day Battle of Atlanta, part of the Atlanta Campaign that led to the surrender of Atlanta a month later. General Otis Howard succeeded him as commander of the Army and Department of the Tennessee. His adversary, John Bell Hood, wrote,  When Sherman received word of McPherson's death, he openly wept. He then penned a letter to Emily Hoffman in Baltimore, stating:  McPherson was the second-highest-ranking Union officer to be killed in action during the war (the highest ranking was John Sedgwick).