Magnetic cooling could be a radically different energy solution that could replace conventional vapour compression refrigeration in the future. It is now shown that a Heusler-type magnetocaloric alloy exhibits a remarkable cooling capability due to the effect of a sharp structural transformation at a specific temperature. The finding may be of relevance beyond Heusler alloys and represents an important step towards the implementation of cooling systems based on magnetocaloric materials.