We use transport and neutron scattering to study electronic, structural, and magnetic properties of the electron-doped BaFe2−xNixAs2 iron pnictides in uniaxial strained and external stress free detwinned state. Using a specially designed in-situ mechanical detwinning device, we demonstrate that the in-plane resistivity anisotropy observed in the uniaxial strained tetragonal state of BaFe2−xNixAs2 below a temperature T * , previously identified as a signature of the electronic nematic phase, is also present in the stress free tetragonal phase below T * * (< T * ). By carrying out neutron scattering measurements on BaFe2As2 and BaFe1.97Ni0.03As2, we argue that the resistivity anisotropy in the stress free tetragonal state of iron pnictides arises from the magnetoelastic coupling associated with antiferromagnetic order. These results thus indicate that the local lattice distortion and nematic spin correlations are responsible for the resistivity anisotropy in the tetragonal state of stress free iron pnictides, and suggest that resistivity anisotropy, spin excitation anisotropy, and orbital ordering found in the paramagnetic state of uniaxial strained iron pnictides are due to the externally applied uniaxial strain and its coupling to nematic susceptibility.