During the time of the so-called "Rewarding Truce", which encompassed the 17 years from the end of the Ten Years' War in 1878, fundamental changes took place in Cuban society. With the abolition of slavery in October 1886, former slaves joined the ranks of farmers and urban working class. Most wealthy Cubans lost their rural properties, and many of them joined the urban middle class. The number of sugar mills dropped and efficiency increased, with only companies and the most powerful plantation owners owning them. The numbers of campesinos and tenant farmers rose considerably. Furthermore, American capital began flowing into Cuba, mostly into the sugar and tobacco businesses and mining. By 1895, these investments totalled $50 million. Although Cuba remained Spanish politically, economically it became increasingly dependent on the United States.