The reaction Mg + H2O → MgO + H2 takes place only in the presence…