It was once thought that competition with early bird species might have resulted in the extinction of many of the pterosaurs. Part of this is due to the fact it used to be thought that by the end of the Cretaceous, only large species of pterosaurs were present (no longer true; see below). The smaller species were thought to have become extinct, their niche filled by birds. However, pterosaur decline (if actually present) seems unrelated to bird diversity, as ecological overlap between the two groups appears to be minimal. In fact, at least some avian niches were reclaimed by pterosaurs prior to the KT event. At the end of the Cretaceous period, the Cretaceous–Paleogene extinction event, which wiped out all non-avian dinosaurs and most avian dinosaurs as well, and many other animals, seems also to have taken the pterosaurs.