We consider the dynamics of two layers of incompressible electrically conducting fluid interacting with the magnetic field, which are confined within a 3D horizontally infinite slab and separated by a free internal interface. We assume that the upper fluid is heavier than the lower fluid so that the fluids are susceptible to the Rayleigh-Taylor instability. Yet, we show that the viscous and non-resistive problem around the equilibrium is nonlinearly stable provided that the strength of the vertical component of the steady magnetic field, \(\abs{\bar B_3}\), is greater than the critical value, \(\mathcal{M}_c\), which we identify explicitly. We also prove that the problem is nonlinearly unstable if \(\abs{\bar B_3}<\mathcal{M}_c\). Our results indicate that the non-horizontal magnetic field has strong stabilizing effect on the Rayleigh-Taylor instability but the horizontal one does not have.