Fluorination of hexagonal boron nitride, a common insulator, turns it into a magnetic semiconductor. That may make the heat-resistant material suitable for electronics and sensors in extreme environments.