Transition from a Taylor-Couette turbulent flow to a completely two-dimensional axisymmetric turbulent state is realized numerically by increasing gradually the strength of the azimuthal magnetic field produced by electric current flowing through the axial rod. With the increase of the Hartmann number, the Taylor-vortex-like structures shrink, move closer to the inner cylinder, and turn into unsteady but perfect tori at sufficiently high Hartmann numbers.