A 200 kV Jeol JEM 2100 F STEM equipped with an Oxford X-max80 EDX detector was used to determine the microstructure and chemistry on the nanometer scale. For the TEM studies, the samples were demagnetized, thinned via conventional grinding and polishing plane to a thickness of ~20 µm with the hexagonal c-axis of Sm2Co17 lying perpendicular to the polishing direction and finally mounted on Mo grids. Ion thinning was done in a Gatan Dual Ion Mill Model 600 using Ar+ ions with an incidence angle of 15° at 5 keV. The previous milling step was followed by two 10 min polishing steps at 13° ion incidence using 3 keV and a final step at 1.5 keV. A plasma cleaning step was performed for 2 h in a Gatan Solarus plasma cleaning system before introducing the specimen in the microscope. Annular dark-field (ADF) scanning transmission electron microscope (STEM) images and energy-dispersive X-ray (EDX) spectra were obtained using a 0.7 nm spot size, this being a compromise between spatial resolution and EDX signal (detector dead time around 10%). Quantification of EDX spectra was carried out standardless using the Cliff-Lorimer k-factor method (Supplementary Note 1). Atomic resolution images were acquired using a Jeol Atomic Resolution Microscope (ARM) 200 F equipped with a Schottky emitter and a C s-probe corrector (see also Supplementary Note 1). An electron energy of 120 keV was used to reduce magnetization effects of the sample. High-angle annular dark-field (HAADF) images were acquired using the 8 C spot size setting. A 30 µm condenser aperture was inserted yielding a convergence angle of 24.6 mrad. 6 cm camera length was used for HAADF imaging corresponding to a 90 mrad inner and a 370 mrad outer HAADF detector angle. The specimen thickness according to electron energy-loss spectroscopy (EELS) was estimated to 0.4–0.7 mean free path (mfp) for sample 1 and 0.7–1.0 mfp for sample 2.