Owing to interdependences among species in ecological communities, the loss of one species can trigger a cascade of secondary extinctions with potentially dramatic effects on the functioning and stability of the community. It is, therefore, important to assess the risk and likely extent of secondary extinctions. Community viability analysis is a new technique that can be used to accomplish this goal. The analysis can also be used to identify fragile community structures and keystone species and, hence, to provide guidelines for conservation priorities. Here, we describe the principles underlying community viability analysis and review its contributions to our understanding of the response of ecological communities to species loss.