text: The Seven Days began on Wednesday, June 25, 1862, with a Union attack in the minor Battle of Oak Grove, but McClellan quickly lost the initiative as Lee began a series of attacks at Beaver Dam Creek (Mechanicsville) on June 26, Gaines's Mill on June 27, the minor actions at Garnett's and Golding's Farm on June 27 and 28, and the attack on the Union rear guard at Savage's Station on June 29. McClellan's Army of the Potomac continued its retreat toward the safety of Harrison's Landing on the James River. Lee's final opportunity to intercept the Union Army was at the Battle of Glendale on June 30, but poorly executed orders and the delay of Stonewall Jackson's troops allowed his enemy to escape to a strong defensive position on Malvern Hill. At the Battle of Malvern Hill on July 1, Lee launched futile frontal assaults and suffered heavy casualties in the face of strong infantry and artillery defenses.
  The Seven Days ended with McClellan's army in relative safety next to the James River, having suffered almost 16,000 casualties during the retreat. Lee's army, which had been on the offensive during the Seven Days, lost over 20,000. As Lee became convinced that McClellan would not resume his threat against Richmond, he moved north for the northern Virginia campaign and the Maryland campaign.
  Background
  Military situation
  The Peninsula campaign
  The Peninsula campaign was the unsuccessful attempt by McClellan to capture the Confederate capital of Richmond and end the war. It started in March 1862, when McClellan landed his army at Fort Monroe and moved northwest, up the Virginia Peninsula beginning in early April. Confederate Brig. Gen. John B. Magruder's defensive position on the Warwick Line caught McClellan by surprise. His hopes for a quick advance foiled, McClellan ordered his army to prepare for a siege of Yorktown. Just before the siege preparations were completed, the Confederates, now under the direct command of Johnston, began a withdrawal toward Richmond.