An iron oxyborate Fe3BO5 material as a high-performance anode for lithium-ion and sodium-ion batteries.