We introduce a general framework for reasoning with prioritized propositional data by aggregation of distance functions. Our formalism is based on a possible world semantics, where conclusions are drawn according to the most `plausible' worlds (interpretations), namely: the worlds that are as `close' as possible to the set of premises, and, at the same time, are as `faithful' as possible to the more reliable (or important) information in this set. This implies that the consequence relations that are induced by our framework are derived from a pre-defined metric on the space of interpretations, and inferences are determined by a ranking function applied to the premises. We study the basic properties of the entailment relations that are obtained by this framework, and relate our approach to other methods of maintaining incomplete and inconsistent information, most specifically in the contexts of (iterated) belief revision, consistent query answering in database systems, a...