We consider a horizontal ferrofluid layer sandwiched between two layers of
immiscible non-magnetic fluids. In a sufficiently strong vertical magnetic
field the flat interfaces between magnetic and non-magnetic fluids become
unstable to the formation of peaks. We theoretically investigate the interplay
between these two instabilities for different combinations of the parameters of
the fluids and analyze the evolving interfacial patterns. We also estimate the
critical magnetic field strength at which thin layers disintegrate into an
ordered array of individual drops