In late June, Lee organized a plan to drive McClellan's army away from the capital, which culminated in what became known as the Seven Days Battles. At daybreak on June 27 at Gaines's Mill, the Confederate Army attacked the V Corps of the Union Army under Brigadier General Fitz John Porter, which was positioned north of the Chickahominy River on McClellan's right flank. Federal troops held their lines for most of the day against attacks from the divisions of A.P. Hill and D.H. Hill, and Jackson did not arrive until afternoon. At about 5 pm, Longstreet received orders from Lee to join the battle. Longstreet's fresh brigades under Pickett and Richard H. Anderson, accompanied by the brigades of Brigadier General John Bell Hood and Colonel Evander M. Law from William H.C. Whiting's division, charged the Union lines, forcing them to retreat across the Chickahominy. Longstreet was engaged again on June 30 with about 20,000 men at Glendale. He departed from his usual strategy of placing troops several lines deep and instead spread them out, which in the opinion of some military historians cost him the battle. His efforts were further damaged by the slowness of other Confederate commanders, and McClellan was able to withdraw his army to the high plateau of Malvern Hill. Jackson, engaged at White Oak Swamp, ignored reports of ways in which to cross the swamp, and refused to answer an inquiry from Longstreet's staff officer John Fairfax. Huger's advance was slow enough to allow Federal troops to be transported away from guarding him and towards Longstreet, and Theophilus Holmes also performed poorly. Nearly 50,000 Confederate troops stood within a few miles of the field at Glendale and rendered little to no assistance. In a reconnaissance on the evening of June 30, Longstreet reported to Lee that conditions were favorable enough to justify assault. In the fighting the next day, Longstreet surrendered A.P. Hill's entire division to Magruder, and marched his remaining troops toward the Union positions on the Confederate extreme right. His men were exposed to fire on their flanks from McClellan's troops and were forced to withdraw without success.