The Battle of Williamsburg was fought on May 5, 1862, during the Peninsula Campaign, as Union forces pursued Joseph E. Johnston’s retreating Confederate army toward Richmond, Virginia. Heavy fighting took place around the Williamsburg Line and Fort Magruder, where Confederate forces delayed the Union advance. The battle was inconclusive, but the Confederate rearguard action gave Johnston time to move his army toward stronger defenses closer to Richmond.