Pinning-controlled permanent magnets operating at elevated temperatures boost device performances of magnet-based industrial applications1–9. These include microwave tubes, gyroscopes and accelerometers, reaction and momentum wheels to control and stabilize satellites, magnetic bearings, sensors and actuators. Sm2(Co,Fe,Cu,Zr)17 is an important industrially used material system, since it has both a high Curie temperature and a high magnetocrystalline anisotropy10–14. Unlike nucleation-controlled Nd-Fe-B-based permanent magnets, the Sm2Co17-type maintains its excellent magnetic properties at elevated temperatures15. In order to precisely control the synthesis parameters to obtain such high magnetic performances, it is necessary to thoroughly understand the atomic-scale structure and behavior of the involved phases. This is not a straightforward task and although the relationship of microstructure and chemistry with the magnetic properties has been widely studied by local techniques such as electron microscopy, the number of atomic-scale investigations is still limited1–3, 16–20.