Ammonia is prepared commercially in vast quantities. The major method of production is the Haber process, in which nitrogen is combined directly with hydrogen at high temperatures and pressures in the presence of a catalyst. It is obtained as a byproduct of the destructive distillation of coal. Ammonia is also prepared synthetically by the cyanamide process: nitrogen gas combines with calcium carbide, CaC2, at high temperatures to form calcium cyanamide, CaCN2, and carbon; the calcium cyanamide reacts with steam to form calcium carbonate, CaCO3, and ammonia. For use in the laboratory, ammonia is prepared by heating an ammonium salt with a strong base. It can also be prepared by reacting a metal nitride with water.