Abstract. We give a new definition of topological pressure for arbitrary (noncompact, non-invariant) Borel subsets of metric spaces. This new quantity is defined via a suitable variational principle, leading to an alternative definition of an equilibrium state. We study the properties of this new quantity and compare it with existing notions of topological pressure. We are particularly interested in the situation when the ambient metric space is assumed to be compact. We motivate the naturality of our definition by applying it to some interesting examples, including the level sets of the pointwise Lyapunov exponent for the Manneville-Pomeau family of maps.