Detailed Instructions: In this task, you are given a question and a context passage. You have to answer the question based on the given passage.
Q: Which happened earlier, the defeat of the Confederacy or the founding of the Red Shirts?, Context: With the defeat of the Confederacy in 1865, the Reconstruction Era began. The United States abolished slavery without compensation to slaveholders or reparations to freedmen. A Republican Party coalition of black freedmen, northern carpetbaggers and local scalawags controlled state government for three years. The white conservative Democrats regained control of the state legislature in 1870, in part by Ku Klux Klan violence and terrorism at the polls, to suppress black voting. Republicans were elected to the governorship until 1876, when the Red Shirts, a paramilitary organization that arose in 1874 and was allied with the Democratic Party, helped suppress black voting. More than 150 black Americans were murdered in electoral violence in 1876.
A:
the defeat of the Confederacy