Controlling magnetically polar domains with an electric field, rather than a magnetic field, is a promising route to the next generation of fast, energy-efficient devices for data storage. However, electrical switching of magnetic polarity has been directly observed in bulk single crystals of just a few multiferroics, at low temperatures. Through cutting-edge fabrication and synchrotron x-ray techniques, the authors demonstrate complete reversal of magnetic polarity by an applied electric field in a BiFeO${}_{3}$-based device, $a\phantom{\rule{0}{0ex}}t$ $r\phantom{\rule{0}{0ex}}o\phantom{\rule{0}{0ex}}o\phantom{\rule{0}{0ex}}m$ $t\phantom{\rule{0}{0ex}}e\phantom{\rule{0}{0ex}}m\phantom{\rule{0}{0ex}}p\phantom{\rule{0}{0ex}}e\phantom{\rule{0}{0ex}}r\phantom{\rule{0}{0ex}}a\phantom{\rule{0}{0ex}}t\phantom{\rule{0}{0ex}}u\phantom{\rule{0}{0ex}}r\phantom{\rule{0}{0ex}}e$. This is a key result in the quest for practical applications of this class of materials.