  We present an improved version of the ECHO-QGP numerical code, which
self-consistently includes for the first time the effects of electromagnetic
fields within the framework of relativistic magnetohydrodynamics (RMHD). We
discuss results of its application in relativistic heavy-ion collisions in the
limit of infinite electrical conductivity of the plasma. After reviewing the
relevant covariant $3\!+\!1$ formalisms, we illustrate the implementation of
the evolution equations in the code and show the results of several tests aimed
at assessing the accuracy and robustness of the implementation. After providing
some estimates of the magnetic fields arising in non-central high-energy
nuclear collisions, we perform full RMHD simulations of the evolution of the
Quark-Gluon Plasma in the presence of electromagnetic fields and discuss the
results. In our ideal RMHD setup we find that the magnetic field developing in
non-central collisions does not significantly modify the elliptic-flow of the
final hadrons. However, since there are uncertainties in the description of the
pre-equilibrium phase and also in the properties of the medium, a more
extensive survey of the possible initial conditions as well as the inclusion of
dissipative effects are indeed necessary to validate this preliminary result.
