The Battle of Beaver Dam Creek, also known as the Battle of Mechanicsville or Ellerson's Mill, took place on June 26, 1862, in Hanover County, Virginia, was the first major engagement of the Seven Days Battles during the Peninsula Campaign of the American Civil War. It was the start of Confederate General Robert E. Lee's counter-offensive against the Union Army of the Potomac, under Maj. Gen. George B. McClellan, which threatened the Confederate capital of Richmond. Lee attempted to turn the Union right flank, north of the Chickahominy River, with troops under Maj. Gen. Thomas J. "Stonewall" Jackson, but Jackson failed to arrive on time. Instead, Maj. Gen. A.P. Hill threw his division, reinforced by one of Maj. Gen. D.H. Hill's brigades, into a series of futile assaults against Brig. Gen. Fitz John Porter's V Corps, which occupied defensive works behind Beaver Dam Creek. Confederate attacks were driven back with heavy casualties. Porter withdrew his corps safely to Gaines Mill, with the exception of Company F (a.k.a. The Hopewell Rifles) of the 8th Pennsylvania Reserve Regiment who did not receive the orders to retreat. Background and Lee's plan Military situation After the Battle of Seven Pines, on May 31 and June 1, McClellan and the Army of the Potomac sat passively at the outskirts of Richmond for almost a month. Lee, newly appointed commander of the Confederate Army of Northern Virginia, devoted this period to reorganizing his army and preparing a counter-attack. He also sent for reinforcements. Stonewall Jackson arrived on June 25 from the Shenandoah Valley following his successful Valley Campaign. He brought four divisions: his own, now commanded by Brig. Gen. Charles S. Winder, and those of Maj. Gen. Richard S. Ewell, Brig. Gen. William H. C. Whiting, and Maj. Gen. D.H. Hill. The Union Army straddled the rain-swollen Chickahominy River. Four of the Army's five corps were arrayed in a semicircular line south of the river. The V Corps under Brig. Gen. Porter was north of the river near Mechanicsville in an L-shaped line running north–south behind Beaver Dam Creek and southeast along the Chickahominy. Lee moved most of his army north of the Chickahominy to attack the Union north flank. He left only two divisions (under Maj. Gens. Benjamin Huger and John B. Magruder) to face the Union main body. This concentrated about 65,000 troops against 30,000, leaving only 25,000 to protect Richmond against the other