This paper is devoted to the proof of two results. The first was conjectured in 1994 by the author. It concerns the identity, under certain assumptions, of the universal deformation ring of $p$-nearly ordinary Galois representations and a local component of the universal nearly ordinary Hecke algebra in the sense of Hida. The other, which relies on the first, concerns the modularity of certain abelian surfaces. More precisely, one can associate to certain irreducible abelian surfaces defined over the rationals overconvergent $p$-adic cusp eigenforms. The question of whether these forms are classical is not studied in this paper.