Although many novel members of the Coronaviridae have recently been recognized in different species, the ecology of coronaviruses has not been established. Our study indicates that bats harbor a much wider diversity of coronaviruses than any other animal species. Dating of different coronavirus lineages suggests that bat coronaviruses are older than those recognized in other animals and that the human severe acute respiratory syndrome (SARS) coronavirus was directly derived from viruses from wild animals in wet markets of southern China. Furthermore, the most closely related bat and SARS coronaviruses diverged in 1986, an estimated divergence time of 17 years prior to the outbreak, suggesting that there may have been transmission via an unknown intermediate host. Analysis of lineage-specific selection pressure also indicated that only SARS coronaviruses in civets and humans were under significant positive selection, also demonstrating a recent interspecies transmission. Analysis of population dynamics revealed that coronavirus populations in bats have constant population growth, while viruses from all other hosts show epidemic-like increases in population. These results indicate that diverse coronaviruses are endemic in different bat species, with repeated introductions to other animals and occasional establishment in other species. Our findings suggest that bats are likely the natural hosts for all presently known coronavirus lineages and that all coronaviruses recognized in other species were derived from viruses residing in bats. Further surveillance of bat and other animal populations is needed to fully describe the ecology and evolution of this virus family.