With the Confederacy defeated, South Carolina ratified a new constitution in 1865 that recognized the end of slavery, but basically left the pre-war elites in charge. African-American freedmen, who were the majority of South Carolina's population, were given no vote, and their new freedom was soon restricted by Black Codes that limited their civil rights and required black farm laborers to bind themselves with annual labor contracts. Congress was dissatisfied with this minimal change and required a new constitutional convention and elections with universal male suffrage. As African Americans generally favored the Republican Party at the time, their votes resulted in that party controlling the biracial state legislature beginning with the 1868 elections. That campaign was marked by violence; 19 Republican and Union League activists were killed in South Carolina's 3rd congressional district alone.