Chilesaurus is an extinct genus of herbivorous dinosaur. The type and only known species so far is Chilesaurus diegosuarezi. Chilesaurus lived about 145 million years ago (Mya) in the Late Jurassic period of Chile. Showing a combination of traits from theropods, ornithischians, and sauropodomorphs, this genus has far-reaching implications for the evolution of dinosaurs, such as whether the traditional saurischian-ornithischian split is superior or inferior to the proposed group Ornithoscelida.
 Chilesaurus measured roughly 3.2 m (10.5 ft) from nose to tail. The holotype is a smaller individual of half that length.
The most unusual feature of Chilesaurus is its spatula-shaped, elongated teeth, obliquely pointing forwards. Such dentition would be unique in the Theropoda, where it has sometimes been recovered, and is typical for a herbivore, indicating Chilesaurus was a plant-eater. Another adaptation for eating plants is the backward-pointing pubic bone in the pelvis, making room for a large gut. Such a pelvic arrangement is typical for the Ornithischia, which some other studies have allied it with, although is also found in some groups of Theropoda. The hind limb of Chilesaurus had become less adapted to running as shown by a small cnemial crest on the front top of the shinbone, and a broad foot with a weight-bearing first toe. Chilesaurus could defend itself with a strong arm, bearing a large first claw which could be extended outwards, just as with the basal Sauropodomorpha.
 Fossils of Chilesaurus, a vertebra and a rib, were first discovered on 4 February 2004 by the seven-year-old Diego Suárez, who together with his parents, geologists Manuel Suárez and Rita de la Cruz, was searching for decorative stones in the Aysén Region. More specimens were present that in 2008 were reported as representing several dinosaurian species. Only later was it realised that these belonged to a single species with a bizarre combination of traits, alongside a few bones from an unrelated diplodocid sauropod.
 In 2015, the type species C. diegosuarezi was named and described by Fernando Emilio Novas, Leonardo Salgado, Manuel Suárez, Federico Lisandro Agnolín, Martín Dario Ezcurra, Nicolás Chimento, Rita de la Cruz, Marcelo Pablo Isasi, Alexander Omar Vargas, and David Rubilar-Rogers. The generic name refers to Chile. The specific name honours Diego Suárez.
 The holotype, SNGM-1935, was found in a layer of the Toqui Formation dating from the late Tithonian. It consists of an articulated, rather complete skeleton with skull of a juvenile individual, lacking the feet and most of the tail. Four other partial skeletons (specimens SNGM-1937, SNGM-1936, SNGM-1938, and SNGM-1888) and several single bones (specimens SNGM-1889, SNGM-1895, SNGM-1901, SNGM-1894, SNGM-1898, SNGM-1900, and SNGM-1903) are the paratypes. They represent juvenile and adult individuals.
 Chilesaurus was first placed in the theropod group Tetanurae, in a basal position. It shows a confusing mix of traits normally present in Coelurosauria, basal Sauropodomorpha and Ornithischia, but was found in its original description to belong to none of these groups.
 The below cladogram illustrates the taxonomy proposed in the original description of Chilesaurus.

 Herrerasauridae
 Coelophysoidea
 Ceratosauria
 Chilesaurus
 Megalosauroidea
 Allosauroidea
 Coelurosauria
 Alternatively, Baron & Barrett proposed in 2017 that Chilesaurus may be a basal ornithischian, with ornithischians being closer to theropods than sauropodomorphs as a part of the Ornithoscelida. Less than a year later, Müller et al. (2018) published a reply to Baron & Barrett (2017), arguing that their phylogenetic dataset actually suggested that Chilesaurus was a basal sauropodomorph rather than an ornithischian. Baron & Barrett reached out to Müller et al. to inform them that they had accidentally published a faulty early version of their dataset with many traits scored incorrectly, and that their original results were based on an edited final dataset. They corrected their original publication and supplied the final dataset to Müller et al., who agreed that it supported the placement of Chilesaurus in Ornithischia as Baron & Barrett (2017) argued. However, Müller et al. also noted that Baron & Barrett did not test the original proposal of Chilesaurus as a theropod, and that its classification was still uncertain. Baron & Barrett disagreed, stating how Chilesaurus was recovered as an ornithischian regardless of the parameters used in analyses, and that the uncertainty claimed by Müller et al. was a result of the erroneous dataset being supplied to those authors. Baron & Barrett also note that Chilesaurus is crucial to their finding of Ornithoscelida, a hypothesis of dinosaur evolution which places theropods with ornithischians instead of sauropodomorphs. Below is a cladogram illustrating the classification proposed by Baron & Barrett (2017), which places Chilesaurus as the most basal ornithischian.
 Herrerasauridae
 Sauropodomorpha
 Theropoda
 Chilesaurus
 Pisanosaurus
 Neornithischia
 Thyreophora