It was the first independent nation of Latin America and the Caribbean, the first black -led republic in the world, and the second republic in the Americas when it gained independence in 1804 as part of a successful slave revolution lasting nearly a decade.