Many Cubans were torn between desire for the profits generated by sugar and a repugnance for slavery, which they saw as morally, politically, and racially dangerous to their society. By the end of the 19th century, slavery was abolished. However, prior to the abolition of slavery, Cuba gained great prosperity from its sugar trade. Originally, the Spanish had ordered regulations on trade with Cuba, which kept the island from becoming a dominant sugar producer. The Spanish were interested in keeping their trade routes and slave trade routes protected. Nevertheless, Cuba's vast size and abundance of natural resources made it an ideal place for becoming a booming sugar producer. When Spain opened the Cuban trade ports, it quickly became a popular place. New technology allowed a much more effective and efficient means of producing sugar. They began to use water mills, enclosed furnaces, and steam engines to produce higher-quality sugar at a much more efficient pace than elsewhere in the Caribbean.