The Battle of Williamsburg, also known as the Battle of Fort Magruder, took place on May 5, 1862, in York County, James City County, and Williamsburg, Virginia, as part of the Peninsula Campaign of the American Civil War. It was the first pitched battle of the Peninsula Campaign, in which nearly 41,000 Federals and 32,000 Confederates were engaged, fighting an inconclusive battle that ended with the Confederates continuing their withdrawal. Following up the Confederate retreat from Yorktown, the Union division of Brig. Gen. Joseph Hooker 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 Brig. Gen. Philip Kearny's division arrived to stabilize the Federal position. Brig. Gen. Winfield S. 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 in the direction of Richmond, Virginia. Background When Confederate General Joseph E. Johnston unexpectedly withdrew his forces from the Warwick Line at the Siege of Yorktown the night of May 3, Union Maj. Gen. George B. McClellan was taken by surprise and was unprepared to mount an immediate pursuit. On May 4, he ordered cavalry commander Brig. Gen. George Stoneman to pursue Johnston’s rearguard and sent approximately half of his Army of the Potomac along behind Stoneman, under the command of Brig. Gen. Edwin V. Sumner. He also ordered Brig. Gen. William B. Franklin's division to board transport ships on the York River in an attempt to move upstream and land so as to cut off Johnston's retreat. However, it took two days just to board the men and equipment onto the ships, so the maneuver had no effect on the battle of May 5; Franklin's division landed and fought in the Battle of Eltham's Landing on May 7. By May 5, Johnston's army was making slow progress on muddy roads and Stoneman's cavalry was skirmishing with Brig. Gen. J.E.B. Stuart's cavalry, Johnston's rearguard. To give time for the bulk of his army to get free, Johnston detached part of his force to make a stand at a large earthen fortification, Fort Magruder, straddling the Williamsburg Road (from Yorktown), constructed earlier by Brig. Gen. John B. Magruder. Opposing forces Union Confederate