The division of the island of Hispaniola dates to the European colonial period, when in the 16th-17th centuries the Spanish colonised the eastern part of the island and the French the west. In 1697 France and Spain settled their hostilities by way of the Treaty of Ryswick of 1697, which divided Hispaniola between French Saint-Domingue (Haiti) and Spanish Santo Domingo (DR). A more precise boundary was drawn in 1777 via the Treaty of Aranjuez. The division was cemented by the differing settlements patterns in the two colonies, with the Spanish developing a settler-based society with limited slavery, whereas the French forcibly settled thousands of African slaves in Saint Domingue, with the slave population coming to dominate demographically. In 1791 the Haitian slaves launched the Haitian Revolution, gaining independence from France in 1804 as the First Empire of Haiti. In 1821 the Dominicans declared independence from Spain, however Haiti then invaded and annexed the colony. The Dominicans fought a war against the Haitians and gained independence on 1844, with the border being restored.