  In this paper we study equations of magnetic hydrodynamics with a stress
tensor. We interpret this system as the generalized Euler equation associated
with an abelian extension of the Lie algebra of vector fields with a
non-trivial 2-cocycle. We use the Lie algebra approach to prove the energy
conservation law and the conservation of cross-helicity.
