  We prove the Sato-Tate conjecture for Hilbert modular forms. More precisely,
we prove the natural generalisation of the Sato-Tate conjecture for regular
algebraic cuspidal automorphic representations of $\GL_2(\A_F)$, $F$ a totally
real field, which are not of CM type. The argument is based on the potential
automorphy techniques developed by Taylor et. al., but makes use of automorphy
lifting theorems over ramified fields, together with a 'topological' argument
with local deformation rings. In particular, we give a new proof of the
conjecture for modular forms, which does not make use of potential automorphy
theorems for non-ordinary $n$-dimensional Galois representations.
