Denmark started a colony on St Thomas in 1671, St John in 1718 and purchased Saint Croix from France in 1733. During the 18th century, the Virgin Islands in the Caribbean Sea were divided into two territorial units, one English and the other Danish. Sugar cane, produced by slave labor, drove the islands' economy during the 18th and early 19th centuries. They were also used as a base for pirates. In 1917, the US purchased the islands which had been in economic decline since the abolition of slavery in 1848.