By the time the Spanish departed, most of the main towns lay in ruins and the island was divided among several dozen "caudillos". José María Cabral controlled most of Barahona and the southwest with the support of Báez's mahogany-exporting partners, while cattle rancher Cesáreo Guillermo assembled a coalition of former "Santanista" generals in the southeast, and Gregorio Luperón controlled the north coast. Once the Spanish were vanquished, the numerous military and guerrilla leaders began to fight among themselves. From the Spanish withdrawal to 1879, there were twenty-one changes of government and at least fifty military uprisings. Haiti served as a haven for Dominican political exiles and a base of operations for insurgents, often with the support of the Haitian government, during the frequent civil wars and revolutions of the period.