the mining infrastructure, and population boomed from immigrants seeking to take part in gold and diamond mining. Demand for African slaves did not wane after the decline of the mining industry in the second half of the 18th century. Cattle ranching and foodstuff production proliferated after the population growth, both of which relied heavily on slave labour. 1.7 million slaves were imported to Brazil from Africa from 1700 to 1800, and the rise of coffee in the 1830s further enticed expansion of the slave trade. Brazil was the last country in the Western world to abolish slavery. Forty percent of the total number of slaves brought to the Americas were sent to Brazil. For reference, the United States received 10 percent. Despite being abolished, there are still people working in slavery-like conditions in Brazil in the 21st century. Cuba In 1789 the Spanish Crown led an effort to reform slavery, as the demand for slave labour in Cuba was growing. The Crown issued a decree, Código Negro Español (Spanish Black Code), that specified food and clothing provisions, put limits on the number of work hours, limited punishments, required religious instruction, and protected marriages, forbidding the sale of young children away from their mothers. The British made other changes to the institution of slavery in Cuba. But planters often flouted the laws and protested against them, considering them a threat to their authority and an intrusion into their personal lives. The slaveowners did not protest against all the measures of the codex, many of which they argued were already common practices. They objected to efforts to set limits on their ability to apply physical punishment. For instance, the Black Codex limited whippings to 25 and required the whippings "not to cause serious bruises or bleeding". The slave-owners thought that the slaves would interpret these limits as weaknesses, ultimately leading to resistance. Another contested issue was the work hours that were restricted "from sunrise to sunset"; plantation owners responded by explaining that cutting and processing of cane needed 20-hour days during the harvest season. Those slaves who worked on sugar plantations and in sugar mills were often subject to the harshest of conditions. The field work was rigorous manual labour which the slaves began at an early age. The work days lasted close to 20 hours during harvest and processing, including cultivating and cutting the crops, hauling wagons, and processing sugarcane with