The earliest vertebrates that diverged from the invertebrate chordates were the agnathan jawless fishes, whose extant members include the hagfishes and lampreys. Hagfishes are eel-like scavengers that feed on dead invertebrates and other fishes. Lampreys are characterized by a toothed, funnel-like sucking mouth, and most species are parasitic or predaceous on other fishes. Fishes with jaws (gnathostomes) evolved later. Jaws allowed early gnathostomes to exploit new food sources.
Gnathostomes include the cartilaginous fishes and the bony fishes, as well as all other tetrapods (amphibians, reptiles, mammals). Cartilaginous fishes include sharks, rays, skates, and ghost sharks. Most cartilaginous fishes live in marine habitats, with a few species living in fresh water for part or all of their lives. The vast majority of present-day fishes belong to the clade Osteichthyes, which consists of approximately 30,000 species. Bony fishes (Osteichthyes) can be divided into two clades: Actinopterygii (ray-finned fishes, virtually all extant species) and Sarcopterygii (lobe-finned fishes, comprising fewer than 10 extant species, but form the sister group of the tetrapods).