In May 1864, Major General William T. Sherman led three Union armies from Chattanooga, Tennessee, into north Georgia to break up the Confederate Army of Tennessee under General Joseph E. Johnston. During May, June, and July, Sherman drove Johnston from Dalton to Atlanta, and on July 17 Confederate President Jefferson Davis replaced Johnston with General John Bell Hood. By then Sherman had crossed the Chattahoochee River and was 10 miles north of Atlanta. Although Atlanta's formidable earthworks gave Hood a tactical advantage against a Union frontal assault, Sherman closed within cannon shot and began firing on the city. Hood attacked Sherman at Peachtree Creek on July 20 and again near Decatur on July 21, with heavy casualties on both sides. Sherman's primary strategy was to strike Hood's supply lines, and between July 17 and 24, 1864, Union cavalry broke two of the three railroads supplying Hood's army. A raid on the Montgomery & West Point Railroad near Opelika, Alabama, destroyed 26 miles of track, and another column burned two long trestles over the Yellow and Alcovy rivers near Covington, crippling the Georgia Railroad. At a cost of fewer than 70 casualties, these raids severed Atlanta's access to supplies from Alabama arsenals and granaries and the Confederate gunpowder mill at Augusta. On July 25, confident he could cut Atlanta's only remaining supply line and compel Hood to abandon the city, Sherman ordered his entire cavalry corps, nearly 9,000 officers and men, to prepare for the big raid. He directed Major General George Stoneman to ride east of Atlanta while Brigadier General Edward M. McCook rode to the west, with both columns to converge 30 miles south of Atlanta and wreck the Macon & Western Railroad. While this operation was underway, Sherman also directed an infantry column to march around Hood's left flank to threaten the rail junction at East Point. The day before the raid, Stoneman asked permission, after cutting the railroad, to ride 100 miles farther south to liberate 30,000 Union prisoners of war held at Macon and Andersonville, and Sherman allowed it. On July 30, 1864, Union cavalrymen hurrying toward the Chattahoochee River on tired horses were met by Confederate cavalrymen hiding near the end of an old farm road, and a well-planned ambush began the Battle of Brown's Mill.