A transition towards long-term sustainability in global energy systems based on renewable energy resources can mitigate several growing threats to human society simultaneously: greenhouse gas emissions, human-induced climate deviations, and the exceeding of critical planetary boundaries. However, the optimal structure of future systems and potential transition pathways are still open questions. This research describes a global, 100% renewable electricity system, which can be achieved by 2050, and the steps required to enable a realistic transition that prevents societal disruption. Modelling results show that a carbon neutral electricity system can be built in all regions of the world in an economically feasible manner. This radical transformation will require steady but evolutionary changes for the next 35 years, and will lead to sustainable and affordable power supply globally.