I analyze inference to the best explanation (IBE), and defend it against three problems. First, it seems we have no reason to think that the explanatory virtues exemplified by a theory count as evidence that the theory is true. Second, for all we know, the explanations we consider do not include the true explanation, and so our inference to the best of these explanations is doomed to failure. This is the problem of the bad lot recently defended by Bas van Fraassen. These two difficulties demand an argument that beliefs generated by IBE are justified. I answer this demand by developing a version of comparative reliabilism according to which a belief is justified if it is produced by a reliable process and there is no reliable, competing p...