Which happened last?

A. Some Southern states left the United States of America .
B. Some Souther states set up the Confederacy .
C. Abraham Lincoln wrote the Emancipation Proclamation .
D. Slavery was abolished in all of the United States .