Ulysses S. Grant (born Hiram Ulysses Grant; April 27, 1822 – July 23, 1885) was an American soldier and politician who served as the 18th president of the United States from 1869 to 1877. Before his presidency, Grant led the Union Army as Commanding General of the United States Army in winning the American Civil War. In the intensely disputed Presidential election of 1876, Grant facilitated the approval by Congress of a peaceful compromise. In 1870, to enforce Reconstruction, Congress and Grant created the Justice Department that allowed the Attorney General and the new Solicitor General to prosecute the Klan. Grant's Justice Department did destroy the Ku Klux Klan, but in both his terms Blacks lost political strength in the Southern United States. By October, Grant suspended habeas corpus in part of South Carolina and sent federal troops to help marshals, who initiated prosecutions.