Multi-species conservation priorities often reflect phylogenetic diversity, but other factors, like extinction risks and ecological values of species, are equally important. Ecological values are defined by species interactions, which imply that the optimal in situ protection of phylogenetic diversity is not necessarily obtained through the protection of species. Optimal protection might instead require an increase in the extinction risks, or even an eradication, of species that either compete with, or prey on, other species. We provide a method that can determine the optimal protection of phylogenetic diversity within a set of interacting species. For a set of n interacting species the method requires n2 extinction probabilities, which can be obtained by population viability analyses. The method can incorporate the effects from all possible species interactions together with the effects from all possible patterns by which the effects from the extinction of interacting species are linked together. The method provides a multi-species viability analysis, and a theoretical example is given to illustrate the optimal conservation of four interacting species showing, among other things, the existence of non-trivial solutions.