Barbados grew in the heart of the slave trade in its earliest years. When slave codes were increased and indentured white servants were given higher roles than black slaves, white people were held less in favour than black people. This was due to the lower treatment the slaveholders could bestow upon the latter. After this, Barbados slowly became an island of primarily black people as white people moved to different islands. After becoming the world's leading sugar exporter, Barbados imported slaves from West Africa to tend to the plantations that were driving its economy. While the British abolished slavery in 1807, it continued on the island until 1817 when over 20000 slaves rebelled on over 70 plantations. Full emancipation was given in 1834. The island became independent from the British empire in 1966. Due to their long-standing history with England, the island is primarily Anglican.