Unlike the majority of Southern colleges, the university was kept open throughout the Civil War, despite its state seeing more bloodshed than any other and the near 100% conscription of the American South. After Jubal Early's total loss at the Battle of Waynesboro, Charlottesville was willingly surrendered to Union forces to avoid mass bloodshed, and UVA faculty convinced George Armstrong Custer to preserve Jefferson's university. Although Union troops camped on the Lawn and damaged many of the Pavilions, Custer's men left four days later without bloodshed and the university was able to return to its educational mission. However, an extremely high number of officers of both Confederacy and Union were alumni. UVA produced 1,481 officers in the Confederate Army alone, including four major-generals, twenty-one brigadier-generals, and sixty-seven colonels from ten different states. John S. Mosby, the infamous "Gray Ghost" and commander of the lightning-fast 43rd Battalion Virginia Cavalry ranger unit, had also been a UVA student.