A method of producing hydrogen from ammonia, the method comprising: (a) providing liquid ammonia; (b) heating the liquid ammonia in an evaporator to provide gaseous ammonia, wherein the evaporator is in thermal contact with an inert gas loop which heats and evaporates at least a portion of the liquid ammonia in the evaporator; (c) contacting in a reactor at least a portion of the gaseous ammonia with a metal amide and/or a metal imide to produce hydrogen and nitrogen, wherein the reactor is in thermal contact with the inert gas loop which thereby heats at least a portion of the reactor; (d) cooling at least a portion of the hydrogen and nitrogen produced in the reactor in a first heat exchanger, wherein the first heat exchanger is in thermal contact with the inert gas loop and heat is transferred from at least a portion of the hydrogen and nitrogen produced in the reactor to the inert gas loop; wherein the inert gas loop is a loop containing at least one inert gas being pumped such that the at least one inert gas is brought into thermal contact with the first heat exchanger before being brought into thermal contact with the reactor and subsequently being brought into thermal contact with the evaporator; wherein the at least one inert gas is heated by a heater after being brought into thermal contact with the first heat exchanger and before being brought into thermal contact with the reactor. (a) providing liquid ammonia; (b) heating the liquid ammonia in an evaporator to provide gaseous ammonia, wherein the evaporator is in thermal contact with an inert gas loop which heats and evaporates at least a portion of the liquid ammonia in the evaporator; (c) contacting in a reactor at least a portion of the gaseous ammonia with a metal amide and/or a metal imide to produce hydrogen and nitrogen, wherein the reactor is in thermal contact with the inert gas loop which thereby heats at least a portion of the reactor; (d) cooling at least a portion of the hydrogen and nitrogen produced in the reactor in a first heat exchanger, wherein the first heat exchanger is in thermal contact with the inert gas loop and heat is transferred from at least a portion of the hydrogen and nitrogen produced in the reactor to the inert gas loop; wherein the inert gas loop is a loop containing at least one inert gas being pumped such that the at least one inert gas is brought into thermal contact with the first heat exchanger before being brought into thermal contact with the reactor and subsequently being brought into thermal contact with the evaporator; wherein the at least one inert gas is heated by a heater after being brought into thermal contact with the first heat exchanger and before being brought into thermal contact with the reactor. wherein the inert gas loop is a loop containing at least one inert gas being pumped such that the at least one inert gas is brought into thermal contact with the first heat exchanger before being brought into thermal contact with the reactor and subsequently being brought into thermal contact with the evaporator; wherein the at least one inert gas is heated by a heater after being brought into thermal contact with the first heat exchanger and before being brought into thermal contact with the reactor.