Rutherford Birchard Hayes grew up in Ohio, where he studied law and opened a law firm. When the Civil War broke out, Hayes became an officer in the Union Army. After the war, Hayes, a Republican, served in the U.S. House of Representatives, then served as governor of Ohio. In 1876, Hayes ran for president against Democrat Samuel Tilden. The election results were contested, but ultimately Hayes prevailed. During his term, President Hayes backed equal rights for African Americans, promoted public education, and helped reform the nation's civil service system. Hayes did not seek a second term in office. He retired to private life in 1881.