In the first pitched battle of the Peninsula Campaign, nearly 41,000 Federals and 32,000 Confederates were engaged. Following up the Confederate retreat from Yorktown, Hooker's division encountered the Confederate rearguard near Williamsburg. Hooker assaulted Fort Magruder, an earthen fortification alongside the Williamsburg Road, but was repulsed. Confederate counterattacks, directed by Maj. Gen. James Longstreet, threatened to overwhelm the Union left flank, until Kearny's division arrived to stabilize the Federal position. Hancock's brigade then moved to threaten the Confederate left flank, occupying two abandoned redoubts. The Confederates counterattacked unsuccessfully. Hancock's localized success was not exploited. The Confederate army continued its withdrawal during the night.