  We prove new modularity lifting theorems for p-adic Galois representations in
situations where the methods of Wiles and Taylor--Wiles do not apply. Previous
generalizations of these methods have been restricted to situations where the
automorphic forms in question contribute to a single degree of cohomology. In
practice, this imposes several restrictions -- one must be in a Shimura variety
setting and the automorphic forms must be of regular weight at infinity. In
this paper, we essentially show how to remove these restrictions.
  Our most general result is a modularity lifting theorem which, on the
automorphic side applies to automorphic forms on the group GL(n) over a general
number field; it is contingent on a conjecture which, in particular, predicts
the existence of Galois representations associated to torsion classes in the
cohomology of the associated locally symmetric space. We show that if this
conjecture holds, then our main theorem implies the following: if E is an
elliptic curve over an arbitrary number field, then E is potentially
automorphic and satisfies the Sato--Tate conjecture.
  In addition, we also prove some unconditional results. For example, in the
setting of GL(2) over Q, we identify certain minimal global deformation rings
with the Hecke algebras acting on spaces of p-adic Katz modular forms of weight
one. Such algebras may well contain p-torsion. Moreover, we also completely
solved the problem (for p odd) of determining the multiplicity of an
irreducible modular representation rhobar in the Jacobian J_1(N), where N is
the minimal level such that rhobar arises in weight two.
