This paper analyses Rawls's celebrated difference principle, and its lexicographic extension, in societies with a finite and an infinite number of agents. A unified framework of analysis is set up, which allows one to characterise Rawlsian egalitarian principles by means of a weaker version of a new axiom - the Harm Principle - recently proposed by [13]. This is quite surprising, because the Harm principle is meant to capture a liberal requirement of noninterference and it incorporates no obvious egalitarian content. A set of new characterisations of the maximin and of its lexicographic refinement are derived, including in the intergenerational context with an infinite number of agents.