After the defeat of the Union V Corps at Gaines’ Mill on June 27, 1862, Maj. Gen. George B. McClellan decided to abandon his campaign to capture Richmond. He ordered his army south toward the James River to the safety and resupply of navy vessels there. On June 30, three Confederate divisions converged on the retreating Union army near the crossroads at Glendale. Maj. Gens. James Longstreet and A. P. Hill penetrated the Federal defenses, routing the Pennsylvania Reserve division and other brigades near the Frayser farm. Union counterattacks by the divisions of Brig. Gens. Joseph Hooker and Phillip Kearny saved the Union line of retreat along the Willis Church Road. The battle at Glendale was Lee’s best chance to cut off the Union army from the James River. That night, McClellan pulled the Union army back to a strong position on Malvern Hill, where the fighting would continue the next day.