In 1865, as commanding general, Ulysses S. Grant led the Union Armies to victory over the Confederacy in the American Civil War. As an American hero, Grant was later elected the 18th President of the United States (1869–1877), working to implement Congressional Reconstruction and to remove the vestiges of slavery.