linguistic:paraphrasing, structural:scholar_edition
Evolution

The common ancestor of the two existing sloth genera dates to about 28 million years ago, with similarities between the two- and three- toed sloths an example of convergent evolution to an arboreal lifestyle, "one of the most striking examples of convergent evolution known among mammals". The ancient Xenarthra included a significantly greater variety of species, with a wider distribution, than those of today. Ancient sloths were mostly terrestrial, and some reached sizes that rival those of elephants, as was the case for Megatherium.

Sloths arose in South America during a long period of isolation and eventually spread to a number of the Caribbean islands as well as North America. It is thought that swimming led to oceanic dispersal of pilosans to the Greater Antilles by the Oligocene, and that the megalonychid Pliometanastes and the mylodontid Thinobadistes were able to colonise North America about 9 million years ago, well before the formation of the Isthmus of Panama. The latter development, about 3 million years ago, allowed megatheriids and nothrotheriids to also invade North America as part of the Great American Interchange. Additionally, the nothrotheriid Thalassocnus of the west coast of South America became adapted to a semiaquatic and, eventually, perhaps fully aquatic marine lifestyle. In Peru and Chile, Thalassocnus entered the coastal habitat beginning in the late Miocene. They presumably waded and paddled in the water for short period, but over a span of 4 million years, they eventually evolved into swimming creatures, becoming specialist bottom feeders of seagrasses, similar to the extant sirenians.

Both types of extant tree sloth tend to occupy the same forests; in most areas, a particular species of the somewhat smaller and generally slower-moving three-toed sloth (Bradypus) and a single species of the two-toed type will jointly predominate. Based on morphological comparisons, it was thought the two-toed sloths nested phylogenetically within one of the divisions of the extinct Greater Antilles sloths. Though data has been collected on over 33 different species of sloths by analyzing bone structures, many of the relationships between clades on a phylogenetic tree were unclear. Much of the morphological evidence collected to support the hypothesis of diphyly has been based on the structure of the inner ear.

Recently obtained molecular data from collagen and mitochondrial DNA sequences fall in line with the diphyly (convergent evolution) hypothesis but have overturned some of the other conclusions obtained from morphology. These investigations consistently place two-toed sloths close to mylodontids and three-toed sloths within Megatherioidea, close to Megalonyx, megatheriids and nothrotheriids. They make the previously recognized family Megalonychidae polyphyletic, with both two-toed sloths and Greater Antilles sloths being moved away from Megalonyx. Greater Antilles sloths are now placed in a separate, basal branch of the sloth evolutionary tree.