At the beginning of the Civil War, Rutherford B. Hayes was a major in the 23rd Ohio Volunteers. He distinguished himself and left service as a brevet major general. Elected to the U.S. Congress in 1864, he was re-elected once before serving two terms as governor of Ohio. He retired, then was elected to one more term as governor.
In the 1875 presidential election, it had appeared Hayes lost to Samuel J. Tilden, who had a popular majority and all but one of the electoral votes necessary to win. A total of 20 electoral votes from Oregon, South Carolina, Florida, and Louisiana were disputed. If Hayes won all of them, he would win the election. To settle the dispute surrounding competing returns from the contested states, Congress created an electoral commission, which decided that Hayes should receive all of the disputed ballots. This result came from sectional bargaining--the Compromise of 1877--where Southerners received assurances that Reconstruction would end with the withdrawal of federal troops.
None of the provisions of the compromise survived. Hayes attempted to carry out a policy "to wipe out the color line, to abolish sectionalism, to end the war and bring peace." By 1878 he admitted his policy was a failure. He was more successful with other issues, including civil service reform. Serving only one term as president, which was his pledge, he returned to Ohio and took up humanitarian causes.