Gibbs measures induced by random factor graphs play a prominent role in computer science, combinatorics and physics. A key problem is to calculate the typical value of the partition function. According to the “replica symmetric cavity method”, a heuristic that rests on nonrigorous considerations from statistical mechanics, in many cases this problem can be tackled by way of maximising a functional called the “Bethe free energy”. In this paper we prove that the Bethe free energy upper-bounds the partition function in a broad class of models. Additionally, we provide a sufficient condition for this upper bound to be tight. 1998 ACM Subject Classification G.2.1 Combinatorics, G.3 Probability and Statistics, F.2.2 Nonnumerical Algorithms and Problems Keywords and phrases Belief Propagation, free energy, Gibbs measure, partition function Digital Object Identifier 10.4230/LIPIcs.APPROX-RANDOM.2015.467