The Battle of Gaines' Mill, sometimes known as the Battle of Chickahominy River, took place on June 27, 1862, in Hanover County, Virginia, as the third of the Seven Days Battles (Peninsula Campaign) of the American Civil War. Following the inconclusive Battle of Beaver Dam Creek (Mechanicsville) the previous day, Confederate General Robert E. Lee renewed his attacks against the right flank of the Union Army, relatively isolated on the northern side of the Chickahominy River. There, Brig. Gen. Fitz John Porter's V Corps had established a strong defensive line behind Boatswain's Swamp. Lee's force was destined to launch the largest Confederate attack of the war, about 57,000 men in six divisions. Porter's reinforced V Corps held fast for the afternoon as the Confederates attacked in a disjointed manner, first with the division of Maj. Gen. A.P. Hill, then Maj. Gen. Richard S. Ewell, suffering heavy casualties. The arrival of Maj. Gen. Stonewall Jackson's command was delayed, preventing the full concentration of Confederate force before Porter received some reinforcements from the VI Corps. At dusk, the Confederates finally mounted a coordinated assault that broke Porter's line and drove his men back toward the Chickahominy River. The Federals retreated across the river during the night. The Confederates were too disorganized to pursue the main Union force. Gaines' Mill saved Richmond for the Confederacy in 1862; the tactical defeat there convinced Army of the Potomac commander Maj. Gen. George B. McClellan to abandon his advance on Richmond and begin a retreat to the James River. The battle occurred in almost the same location as the Battle of Cold Harbor nearly two years later. Background Military situation McClellan's Army of the Potomac had pushed to within a few miles of the Confederate capital of Richmond and had stalled following the Battle of Seven Pines in late May 1862. Lee wanted to take the initiative, believing that remaining on the strategic defensive would play into Union hands and allow the Confederacy to be worn down. He planned to shift his 90,000-man Confederate army to the north of Richmond, and attack McClellan's right flank. The Confederate cavalry under the command of Maj. Gen. J.E.B. Stuart had ridden around McClellan's army, confirming that the flank was open—not anchored on Totopotomoy Creek—and vulnerable. Lee planned to use Maj. Gen. Stonewall Jackson's force, transported by rail from the Shenandoah Valley, to attack on McClellan's right and rear, while