The Permian was also a period of adaptive radiation in insects. Beetles (Coleoptera) appeared; so did flies (Diptera). 22 out of a total of 36 known orders of insects are known from the Permian. Some became extinct in the end-Permian event, but more radiation followed in the Mesozoic. Insects were probably, by the end of the Permian, the largest phylum, in terms of number of species.