  In this paper, the instability of shallow water shear flow with a sheared
parallel magnetic field is studied. Waves propagating in such magnetic shear
flows encounter critical levels where the phase velocity relative to the basic
flow $c-U(y)$ matches the Alfv\'en wave velocities $\pm B(y)/\sqrt{\mu\rho}$,
based on the local magnetic field $B(y)$, the magnetic permeability $\mu$ and
the mass density of the fluid $\rho$. It is shown that when the two critical
levels are close to each other, the critical layer can generate an instability.
The instability problem is solved, combining asymptotic solutions at large
wavenumbers and numerical solutions, and the mechanism of instability explained
using the conservation of momentum. For the shallow water MHD system, the paper
gives the general form of the local differential equation governing such
coalescing critical layers for any generic field and flow profiles, and
determines precisely how the magnetic field modifies the purely hydrodynamic
stability criterion based on the potential vorticity gradient in the critical
layer. The curvature of the magnetic field profile, or equivalently the
electric current gradient, $J' = - B''/\mu$ in the critical layer is found to
play a complementary role in the instability.
