Following the Battle of Williamsburg on May 5, 1862, during the Peninsula Campaign, with 3,800 Confederate and Union casualties, Williamsburg and the College of William and Mary were occupied by the Union Army. The Brafferton building of the college was used for a time as quarters for the commanding officer of the Union garrison occupying the town. On September 9, 1862, drunken soldiers of the 5th Pennsylvania Cavalry set fire to the college building, purportedly in an attempt to prevent Confederate snipers from using it for cover. Much damage was done to the community during the Union occupation, which lasted until September 1865.