Thalassocnus is an extinct genus of semiaquatic ground sloths from the Miocene and Pliocene of the Pacific South American coast. It is monotypic within the subfamily Thalassocninae. The five species—T. antiquus, T. natans, T. littoralis, T. carolomartini, and T. yuacensis—represent a chronospecies, a population gradually adapting to marine life in one direct lineage. They are the only known aquatic sloths, but they may have also been adapted to a terrestrial lifestyle. They have been found in the Pisco Formation of Peru, the Tafna Formation of Argentina, and the Bahía Inglesa, Coquimbo, and Horcón formations of Chile. Thalassocninae has been placed in both the families Megatheriidae and Nothrotheriidae.
 Thalassocnus evolved several marine adaptations over the course of 4 million years, such as dense and heavy bones to counteract buoyancy, the internal nostrils migrating farther into the head to help with breathing while completely submerged, the snout becoming wider and more elongated to consume aquatic plants better, and the head angling farther and farther downwards to aid in bottom feeding. The long tail was probably used for diving and balance similarly to the modern day beaver (Castor spp.) and platypus (Ornithorhynchus anatinus).
 Thalassocnus probably walked across the seafloor and dug up food with its claws. They probably could not do high-powered swimming, relying on paddling if necessary. Early Thalassocnus were probably generalist grazers eating seaweed and seagrasses close to shore, whereas later species specialized on seagrasses farther off the coast. They were probably preyed upon by sharks and macroraptorial sperm whales such as Acrophyseter. Thalassocnus were found in formations with large marine mammal and shark assemblages.
 Thalassocnus were ground sloths that lived from the Late Miocene to the end of the Pliocene—Late Huayquerian to Early Uquian in the SALMA classification—and all five species were discovered in different horizons of the Pisco Formation in Peru. T antiquus was discovered in the Aguada de Lomas Horizon in 7 or 8 million year old strata; T. natans (the type species) from the Montemar Horizon lived around 6 million years ago (mya); T. littoralis from the Sud-Sacaco Horizon lived around 5 mya; T. carolomartini from the Sacaco Horizon lived between 3 and 4 mya; and T. yaucensis from the Yuaca Horizon lived 3 to 1.5 mya. Specimens were also found in the Bahía Inglesa Formation, the Coquimbo Formation, and the Horcón Formation in Chile. At total of three species has been identified with certainty in Chilean formations, T. carolomartini, T. natans, T. antiquus while the presence of  T. yaucensis is judged likely.   
 In 1995,  the genus Thalassocnus was formally described with the species T. natans, with a partial skeleton, MUSM 433, by paleontologists Christian de Muizon and H. Gregory McDonald. T. littoralis was described from a nearly complete skull, MUSM SAS 1615, in 2002. T. carolomartini from a skull, SMNK PAL 3814, and hands, SMNK PAL 3814, was also described in 2002, and the two T. carolomartini specimens may represent one individual. T. antiquus was described from MUSM 228 in 2003 comprising a skull, jaw, and most of the rest of the body, though the latter is badly damaged. T. yuacensis was described in 2004 from a nearly-complete skeleton, MUSM 1034, and skull, MUSM 37.
 The generic epithet Thalassocnus derives from the Greek word thalassa "sea" and Ocnus, an allegorical deity from Greek and Roman mythology that represents the wasting of time, or slothfulness. 
 The species name carolomartini is named in honor of Carlos Martin, the late owner of the Sacaco hacienda and finder of several bones in the Pisco Formation, including the holotype specimen; and yaucensis after the village Yauca which is near where the species was found.
 In 1968, taxonomist Robert Hoffstetter placed undescribed sloth remains into the family Megatheriidae, possibly belonging to the now-defunct subfamily Planopsinae, mainly based on similarities with the ankle bone and femur. Upon species description in 1995, they were moved into the subfamily Nothrotheriinae. In 2004, this was later elevated to family Nothrotheriidae, and the sloths were put into the new subfamily Thalassocninae. In 2017, the sloths were moved back to the family Megatheriidae. Thalassocninae may have diverged from Megatheriinae during the Friasian age of the Miocene around 16 mya. However, a 2018 analysis retains Thalassocninae within Nothrotheriidae. Given that the two families in question may be sisters, and that the position of Thalassocninae within either would likely be fairly basal, correct family placement may be difficult.
 The five species seem to form one direct lineage (chronospecies), however it is possible T. antiquus is not the ancestor of T. natans.
 Nothrotherium
 Eremotherium
 Megatherium
 T. antiquus
 T. natans
 T. littoralis
 T. carolomartini
 T. yaucensis
 Thalassocnus is the only aquatic xenarthran—a group that includes sloths, anteaters, and armadillos—though the ground sloth Eionaletherium from the Miocene of Venezuela may have adapted to nearshore life, as well as Ahytherium from the Pleistocene of Brazil. However, Thalassocnus may have also been adapted to a terrestrial lifestyle based on its record in Argentina. Thalassocnus, as time progressed, increased in size.
 T. natans has the most complete skeleton preserved and measures from snout to tail 2.55 meters (8.4 ft). Based on a femur-to-body-length ratio, the T. littoralis specimen—probably a female—measured 2.1 meters (6.9 ft) in life, and the T. yuacensis specimen 3.3 meters (11 ft).
 The later Thalassocnus species had enlarged premaxillae and thus had a more elongated snout. The lower jaw progressively elongated and became more spoon-shaped, possibly mimicking the function of the splayed incisor teeth in ruminants. The later species had stronger lips, indicated by the large size of the infraorbital foramen which supplies blood vessels, and, like modern day grazers, probably had horny pads on the lips. Like in other grazers, the snout had a square shape as opposed to the triangular shape in browsers. The nostrils moved from the front of the snout to the top of the snout, similar to seals. In later species, to adapt to feeding underwater, the soft palate of the mouth separating the trachea from the esophagus was more developed, and the internal nostrils between the nasal cavity and the throat were farther inside the head. This also increased the size of the mouth. However, these adaptations also developed in some terrestrial mammals, and so could instead be related to chewing efficiency. The masseter muscle on the skull was probably the main muscle used for biting down. The later species had a more powerful bite to better grasp seagrass. The pterygoid muscle in later species was larger to adapt to a grinding motion rather than a cutting motion while chewing. The latest species, T. carolomartini and T. yaucensis show some evidence of having a short trunk similar to tapirs and elephant seals. 
 Thalassocnus had a hypsodont dentition pattern with high tooth crowns and the tooth enamel extending beyond the gums. Thalassocnus lacked canine teeth, and had four upper and three lower molars on either side of the mouth. Similar to other sloths, the teeth had an outer coating of durodentine, a bonelike version of dentine, and had softer vasodentine inside, a form of dentine that allows blood flow. The teeth were prism-shaped with a circular cross section, and the teeth interlocked tightly while chewing in the later species. In earlier species, the chewing pattern sharpened their teeth. The earlier species had more rectangular teeth that had a similar build to the giant ground sloth Megatherium americanum, whereas the later species had squarer and larger teeth. From earlier species to later species, the teeth show a change of function from cutting food to grinding food.
 Thalassocnus had 7 neck vertebrae; 17 thoracic vertebrae, compared to the 18 in other megatheriid sloths; 3 lumbar vertebrae, like other ground sloths; and 24 tail vertebrae, as opposed to other ground sloths which have less than 20. The vertebral centra segments progressively became shorter in length, making the spine more stable, probably an adaptation for digging efficiency.
 In later species, the spinous processes which jut upwards from the vertebrae are markedly taller in the thoracic vertebrae than the neck vertebrae, as opposed to other sloths where they are around the same height. The small neck vertebrae show they had weak neck muscles, as an aquatic creature does not need to hold its head up, and the neck probably faced downwards while at rest. However, the atlanto-occipital joint, which controls neck movement, was stronger than it is in other sloths, which was probably an adaptation for bottom feeding to keep the head in a fixed position. They also evolved a stiffer and more fused backbone. Like in whales, the head could align directly with the spine.
 The spinous process of the first thoracic vertebra is nearly vertical, but, unlike other sloths, the other vertebrae incline towards the tail; inclination increases in later species, with T. littoralis and T. carolomartini having a 70° inclination as opposed to T. antiquus and T. natans with a 30° inclination. Inclination begins to decrease at the ninth thoracic vertebra. This inclination may have caused less-developed back muscles that would have been needed for high-powered swimming.
 The structure of the tail vertebrae indicates strong musculature and is similar to the beaver (Castor spp.) and platypus (Ornithorhynchus anatinus), which use their tails for balance and diving rather than propulsion while swimming. The length of the tail, proportionally longer than other ground sloths, was probably a diving adaptation similar to modern day cormorants (Phalacrocorax spp.) which use their long tails to provide downward lift to resist buoyancy.
 Indicated by the large fossae, or depressions, on the shoulder blades, elbow, and wrist, the later Thalassocnus species had strong arm muscles. These, and the relatively shorter arms, were probably adaptations for digging. Thalassocnus had five claws.
 The decreasing width of the legs in later species and the reduction of the iliac crests of the pelvis indicate less reliance on them for support—relying more on buoyancy—and the animal probably preferred to sit semi-submerged in the water while resting. The legs also became more flexible, with later species able to, at maximum extension, have the femora reach a horizontal position parallel to the torso. The femur and kneecap are smaller in T. yuacensis than in T. natans. Unlike other ground sloths which put a lot of stress on their hind limbs for locomotion—specifically from standing on two legs (bipedalism)—the leg bones of Thalassocnus are slender. Bipedalism also led to shorter tibiae in ground sloths; the opposite is seen in Thalassocnus where the tibiae and femora are about the same length.
 The earlier species, like other sloths, bore their weight on the sides of their feet (pedolateral), whereas the later species planted their feet flat (plantigrade) to better paddle and walk along the seafloor. The digits decreased in size in later species. The third digit was constantly flexed, perhaps acting like a crampon to anchor itself to the seafloor while digging. Like other ground sloths, the fifth digit was vestigial and non-functioning.
 The thick and dense bones of younger species (pachyosteosclerosis) allowed the animal to combat buoyancy and sink to the seafloor, similar to modern day manatees. T. antiquus had a bone density comparable to terrestrial ground sloths. In later species, the bone grew to be so compact that the medullary cavity, which holds the bone marrow, was nearly absent in the limbs. Likewise, the limbs made the heaviest contribution to overall skeletal weight. This condition has been seen in ancient archaeocete whales with reduced limbs. This developed over a relatively short period of time, around 4 million years. Modern pilosan sloths and anteaters already have denser bones than most other mammals, so the sloth may have had a predisposition to dense bones and developed them much faster (exaptation).
 Thalassocnus were nearshore herbivores which likely became aquatic due to the desertification of the land and a lack of terrestrial food. Earlier species were likely general grazers that foraged for seagrass and seaweed along the sandy coastline, indicated by scratch marks on the teeth caused by chewing sand, probably foraging in areas with a depth of less than 1 meter (3.3 ft). T. antiquus probably did not enter the water to feed, instead eating plants that washed ashore. Conversely, the later species, T. carolomartini and T. yaucensis, lacking these marks, probably fed in deeper waters in a manner similar to manatees. The earlier species chewed with the jaws going up and down to mash food, whereas later species chewed with the jaws going front to back to grind it.
 The later species fed entirely on the seafloor, similar to sirenians (manatees and dugongs) and the extinct desmostylians, becoming specialist bottom feeders of seagrasses. They probably fed on Zosteraceae seagrasses, which are known from the Pisco Formation, specifically the marine eelgrass Zostera tasmanica, which is now only known from Australia. Later Thalassocnus probably mainly walked across the seafloor instead of swimming through the water. They possessed no adaptations for high-powered swimming, probably paddling like terrestrial mammals. The later species probably dug up seagrasses to the roots with their claws like the beaver and platypus, though, like sirenians, also used strong lips to rip out grasses. Their diet may have also included buried food.
 Thalassocnus may have used their claws for loosening dirt, cutting vegetation, grasping food, or anchoring themselves to the seafloor. They may have also used the claws to grab onto rocks during strong waves, and there are tibiae and fibulae remains that have been broken and healed, indicating the individual may have been thrown against the rocks of the shore during a storm. This individual may have used its claws to drag itself onto shore.
 Thalassocnus may have competed with dugongine sirenians for seagrasses, although the latter were apparently rare in the area. They, along with the other marine mammals of the Bahía Inglesa Formation (specifically at Cerro Ballena), could have been killed by harmful algal blooms. They may have been preyed upon by the macroraptorial sperm whale Acrophyseter, and injured individuals vulnerable to shark attacks.
 Thalassocnus may have exhibited sexual dimorphism, indicated by the variation of individual fossils of T. littoralis and between two skulls of T. carolomartini. The skulls show disparity in general size, slenderness of teeth, and the length of the premaxillae—which make up the snout. The size difference in the premaxillae are reminiscent of the developed upper lips or proboscis in males of modern mammals like the elephant seal (Mirounga spp.).
 Thalassocnus fossils have been found in Peru and Chile, an area which has been a desert since the Middle Miocene.
 The Pisco Formation of Peru is known for its wide assemblage of marine vertebrates. Several whales are known, most commonly the mid-sized cetotheriid baleen whales; other whales found are the rorqual baleen whale Balaenoptera siberi, the beaked whale Messapicetus gregarius, the pontoporiid dolphin Brachydelphis mazeasi, some oceanic dolphins, the tusked dolphin Odobenocetops, and the macroraptorial sperm whales Acrophyseter and Livyatan. Other vertebrates include the seals Acrophoca and Hadrokirus, sea turtles such as Pacifichelys urbinai, the gavialid Piscogavialis, cormorants, petrels, and boobies (Sula spp.). The formation has a large cartilaginous fish assemblage, mainly belonging to the ground sharks, such as requiem sharks and hammerhead sharks; and, to a lesser extent, mackerel sharks, such as white sharks, sand sharks, and Otodontidae. Many shark teeth were associated with the extinct broad-tooth mako (Cosmopolitodus hastalis) and megalodon (Carcharocles megalodon). Other cartilaginous fish include eagle rays, sawfish, and angelsharks. Most of the bony fish findings represent tunas and croakers. Livyatan and megalodon were probably the apex predators.
 In Chile, the Bahía Inglesa Formation in the Caldera Basin is known for a large shark population, especially megalodon, the broad-toothed mako and the great white shark (Carcharodon carcharias). Others include the blue shark (Prionace glauca), the smalltooth sand tiger (Odontaspis ferox), Pristiophorus sawsharks, Squatina angelsharks, bullhead sharks (Heterodontus spp.), Myliobatis eagle rays, and elephantfish (Callorhinchus spp.). Pachyptila prion seabirds were found here. It also yielded several marine mammals: a rorqual, Acrophoca, the sperm whale Scaldicetus, and Odobenocetops.
 The Coquimbo Formation in Tongoy Bay and the Horcón Formation of the Valparaíso Basin also display diverse shark assemblages, including megalodon, the great white shark, Carcharodon plicatilis, the shortfin mako (Isurus oxyrinchus), Pristiophorus sawsharks, the smalltooth sand tiger, Carcharhinus sharks, the school shark (Galeorhinus galeus), the copper shark (Carcharhinus brachyurus), and the bluntnose sixgill shark (Hexanchus griseus).
 Several penguin species are known from all three of these formations, such as ancient banded penguins (Spheniscus spp.).
 Thalassocnus went extinct at the end of the Pliocene due to a cooling trend that followed the closing of the Central American Seaway which killed off much of the seagrass of the Pacific South American coast. As seagrass specialists, the later species of Thalassocnus had evolved negative buoyancy to allow them to feed at the sea floor, similar to modern dugongs. This feeding style probably involved bottom-walking, like hippopotamuses and the extinct desmostylians, and digging. Negative buoyancy requires dense bones and a limited layer of blubber, which would make thermoregulation difficult for them in cooler water temperatures, particularly in view of the low metabolic rate of xenarthrans. Thus, Thalassocnus would have been poorly adapted to the changing conditions even if enough seagrass had remained to subsist on.