As urea (formed via the Haber–Bosch process) was significantly more nitrogen-rich (46% compared to ca. 20% nitrogen content) cheaper and faster acting, the role of calcium cyanamide was gradually reduced to a multifunctional nitrogen fertilizer in niche applications. Other reasons for its loss of popularity were its dirty-black color, dusty appearance and irritating properties, as well as its inhibition of an alcohol-degrading enzyme which causes temporary accumulation of acetaldehyde in the body leading to dizziness, nausea and hot flashes when alcohol is consumed around the time of bodily exposure. Calcium cyanamide is prepared from calcium carbide. The carbide powder is heated at about 1,100 °C in an electric furnace into which nitrogen is passed for several hours. The product is cooled to ambient temperatures and any unreacted carbide is leached out cautiously with water. It crystallizes in hexagonal crystal system with space group "R3m" and lattice constants "a" = 3.67 Å, "c" = 14.85 Å. The main use of calcium cyanamide is in agriculture as a fertilizer. In contact with water, it decomposes and liberates ammonia:  It was used to produce sodium cyanide by fusing with sodium carbonate:  Sodium cyanide is used in cyanide process in gold mining. It can also be used in the preparation of calcium cyanide and melamine. Through hydrolysis in the presence of carbon dioxide, calcium cyanamide produces cyanamide:  The conversion is conducted in slurries, consequently most commercial calcium cyanamide is sold as an aqueous solution. Thiourea can be produced by the reaction of hydrogen sulfide with calcium cyanamide in the presence of carbon dioxide. Calcium cyanamide is also used as a wire-fed alloy in steelmaking, in order to introduce nitrogen into the steel. The substance can cause alcohol intolerance, before or after the consumption of alcohol.