Lee then moved onto the offensive, conducting a series of battles that lasted seven days (June 25 – July 1) and pushed McClellan back to a safe but nonthreatening position on the James River. McClellan actually struck first on June 25 at the Battle of Oak Grove, during which two Union divisions attempted to seize ground on which McClellan planned to build siege batteries. McClellan planned to attack again the next day but was distracted by the Confederate attack at Mechanicsville or Beaver Dam Creek, on June 26. Lee observed that McClellan had positioned his army straddling the Chickahominy River and could be defeated in detail. He planned for the division of A.P. Hill to demonstrate in Porter's front while Jackson marched behind the Union positions and attacked from the rear. However, Jackson was late in arriving to his assigned position, while Hill started his attack without waiting for Jackson and was repulsed with heavy casualties. Despite being a Union tactical victory, McClellan still ordered Porter to retreat south towards the rest of the Union army, fearing that Porter would be surrounded by vastly superior Confederate forces by morning. Porter set up defensive lines near Gaines's Mill, covering the bridges over the Chickahominy.