<P> He was nominated as the Republican candidate for the presidency in 1876 and elected through the Compromise of 1877 that officially ended the Reconstruction Era by leaving the South to govern itself . In office he withdrew military troops from the South, ending Army support for Republican state governments in the South and the efforts of African - American freedmen to establish their families as free citizens . He promoted civil service reform, and attempted to reconcile the divisions left over from the Civil War and Reconstruction . </P> <P> Hayes, an attorney in Ohio, served as city solicitor of Cincinnati from 1858 to 1861 . When the Civil War began, he left a fledgling political career to join the Union Army as an officer . Hayes was wounded five times, most seriously at the Battle of South Mountain . He earned a reputation for bravery in combat and was promoted to the rank of brevet major general . After the war, he served in the Congress from 1865 to 1867 as a Republican . Hayes left Congress to run for governor of Ohio and was elected to two consecutive terms, from 1868 to 1872 . Later he served a third two - year term, from 1876 to 1877 . </P> <P> In 1876, Hayes was elected president in one of the most contentious elections in national history . He lost the popular vote to Democrat Samuel J. Tilden but he won an intensely disputed electoral college vote after a Congressional commission awarded him twenty contested electoral votes . The result was the Compromise of 1877, in which the Democrats acquiesced to Hayes's election on the condition that he withdraw remaining U.S. troops protecting Republican office holders in the South, thus officially ending the Reconstruction era . </P> <P> Hayes believed in meritocratic government and equal treatment without regard to race . He ordered federal troops to crush the Great Railroad Strike of 1877 . He implemented modest civil service reforms that laid the groundwork for further reform in the 1880s and 1890s . He vetoed the Bland--Allison Act, which would have put silver money into circulation and raised nominal prices, insisting that maintenance of the gold standard was essential to economic recovery . His policy toward Western Indians anticipated the assimilationist program of the Dawes Act of 1887 . </P>

Which president entered the white house after the heavily disputed election of 1876