We prove the modularity of certain residually reducible p-adic Galois representations of an imaginary quadratic field assuming the uniqueness of the residual representation. We obtain an R = T theorem using a new commutative algebra criterion that might be of independent interest. To apply the criterion, one needs to show that the quotient of the universal deformation ring R by its ideal of reducibility is cyclic Artinian of order no greater than the order of the congruence module T/J , where J is an Eisenstein ideal in the local Hecke algebra T. The inequality is proven by applying the Main conjecture of Iwasawa Theory for Hecke characters and using a result of Berger [Compos Math 145(3):603-632, 2009]. This strengthens our previous result [Berger and Klosin, J Inst Math Jussieu 8(4):669 -692, 2009] to include the cases of an arbitrary p-adic valuation of the L-value, in particular, cases when R is not a discrete valuation ring. As a consequence we show that the Eisenstein ideal is principal and that T is a complete intersection.