Law student William J. Pegram enlisted in the Confederate Army in the spring of 1861 as a private. By 1862 he was an artillery captain winning fame at Mechanicsville where he held his ground under enemy fire although four of his six guns were disabled, half his horses killed, and more than fifty of his ninety cannoneers killed or wounded. Pegram and his battery fought in the battles of Cedar Mountain, Antietam, Chancellorsville, Gettysburg, the Wilderness, Spotsylvania, Cold Harbor, and Petersburg. On April 1, 1865, eight days before the surrender at Appomattox, Pegram was killed in the battle of Five Forks. In four years of active service he had never lost a gun. After the war, Pegram's college classmate, Captain William Gordon McCabe, wrote to Robert E. Lee about why Pegram was never promoted to brigadier general. Lee replied that "no one in the army had a higher opinion of his gallantry & worth than myself....Col. Pegram had the command of a fine battalion of artillery, a service in which he was signally skilled, in which he delighted & in which I understood that he preferred to remain. I do not think under the circumstances that he would have considered the command of a brigade...preferable to the position he held."