 After 12 years of conflict, Napoleon Bonaparte's forces were defeated by Louverture's successor, Jean-Jacques Dessalines (later Emperor Jacques I), who declared Haiti's sovereignty on 1 January 1804—the first independent nation of Latin America and the Caribbean, the second republic in the Americas, the first country to abolish slavery, and the only state in history established by a successful slave revolt.Apart from Alexandre Pétion, the first President of the Republic, all of Haiti's first leaders were former slaves.After a brief period in which the country was split in two, President Jean-Pierre Boyer united the country and then attempted to bring the whole of Hispaniola under Haitian control, precipitating a long series of wars that ended in the 1870s when Haiti formally recognized the independence of the Dominican Republic.