Hydrogen, as an energy carrier for combustion, e.g. as a fuel in engines or for heating purposes, or for producing electrical energy via electrochemical conversion, e.g. in fuel cells, is generated via the reaction of at least one metal or metal hydride, preferably sodium or sodium hydride, with a proton-delivering fluid, or via heating a metal hydride, preferably magnesium hydride, to a temperature at which hydrogen is emitted. The advantage is the increased, but generally still advantageous space requirement in comparison to mineral oil fuels. Preferably the occurring waste materials, largely sodium hydroxide in different forms, are processed to form the output metal or output metal hydride via electrolysis, such that a substantially closed circuit is produced. Advantageously, environmentally friendly and in particular photovoltaically produced current is used for the electrolysis.