The production of ammonia via the Haber–Bosch process is carbon-intensive and centralized, but electrochemical methods such as lithium-mediated processes in organic electrolytes could enable decentralized production using renewable energy. Calcium is now shown to mediate nitrogen reduction for ammonia synthesis.