  Despite oxides and some fluorides perovskites have emerged as prototypes of
multiferroic and magnetoelectric materials, they have not impacted real
devices. Unfortunately, their working temperatures are very low and the
magnetoelectric coupling has been reported to be rather small. Herewith, we
report from first-principles calculations an ideal magnetization reversal
through polarization switching in BaCuF$_4$ which, according to our results,
could be achieved close to room temperature. We also show that this ideal
coupling is driven by a soft mode that combines both, polarization and
octahedral rotation. The later being directly coupled to the weak
ferromagnetism of BaCuF$_4$. This, added to its strong Jahn-Teller distortion
and its orbital ordering, makes this material as a very appealing prototype for
crystals in the $ABX_4$ family in multifunctional applications.
