  We determine the thermodynamic properties of a class of spherically symmetric
and static black holes in AdS4 with magnetic charges and scalar hair. These
black holes are solutions in 4d N=2 gauged supergravity that can arise from
eleven-dimensional supergravity compactified on S^7. At zero temperature, they
preserve supersymmetry and hence are stable. At non-zero temperatures, we
explore in detail the canonical ensemble and stability of solutions and find a
first order phase transition between small and large hairy black holes. The
transition emerges as a liquid-gas phase transition in the dual
three-dimensional field theory on R x S^2 with magnetic flux through S^2.
