The phylogeny of Allotheria, including Multituberculata and Haramiyida, remains unsolved and has generated contentious views on the origin and earliest evolution of mammals. Here we report three new species of a new clade, Euharamiyida, based on six well-preserved fossils from the Jurassic period of China. These fossils reveal many craniodental and postcranial features of euharamiyidans and clarify several ambiguous structures that are currently the topic of debate. Our phylogenetic analyses recognize Euharamiyida as the sister group of Multituberculata, and place Allotheria within the Mammalia. The phylogeny suggests that allotherian mammals evolved from a Late Triassic (approximately 208 million years ago) Haramiyavia-like ancestor and diversified into euharamiyidans and multituberculates with a cosmopolitan distribution, implying homologous acquisition of many craniodental and postcranial features in the two groups. Our findings also favour a Late Triassic origin of mammals in Laurasia and two independent detachment events of the middle ear bones during mammalian evolution.