The agreement that led to the withdrawal of federal troops from the south was the Compromise of 1877.
the 1876 presidential election between Republican Rutherford B. Hayes and Democrat Samuel J. Tilden, leaving Rutherford Hayes as president.
This agreement established that the electoral colleges would grant the presidency to Hayes, in exchange for his government accepting certain demands of the Democratic Party led by Tilden. This agreement was accepted by the Republican party to prevent the Democratic party from imposing limitations on the Hayes government.
The commitments demanded by the Democratic Party were mainly focused on benefiting the population of the South that 12 years ago had been defeated in the Civil War. For example:
Learn more about the 1877 Compromise in: https://brainly.com/question/982419