These losses created an insurmountable disadvantage in men, materiel, and finance. Public support for Confederate President Jefferson Davis's administration eroded over time due to repeated military reverses, economic hardships, and allegations of autocratic government. After four years of campaigning, Richmond was captured by Union forces in April 1865. A few days later General Robert E. Lee surrendered to Union General Ulysses S. Grant, effectively signalling the collapse of the Confederacy. President Davis was captured on May 10, 1865, and jailed for treason, but no trial was ever held.