The continuing profitability of slave-based plantations and the threats of race war slowed the development of abolition movements during the first half of the 19th century. These movements were strongest in Britain, and after 1840 in the United States. The Northern states of the United States abolished slavery, partly in response to the Declaration of Independence, between 1777 and 1804. Britain ended slavery in its empire in the 1830s. However, the plantation economies of the southern United States, based on cotton, and those in Brazil and Cuba, based on sugar, expanded and grew even more profitable. The bloody American Civil War ended slavery in the United States in 1865. The system ended in Cuba and Brazil in the 1880s because it was no longer profitable for the owners. Slavery continued to exist in Africa, where Arab slave traders raided black areas for new captives to be sold in the system. European colonial rule and diplomatic pressure slowly put an end to the trade, and eventually to the practice of slavery itself.