Be2C and Al4C3 on reaction with water liberate methane gas while CaC2 gives acetylene gas. Mg forms MgC2 either when heated directly with carbon in an electric furnace or when MgO is heated with carbon. When MgC2 is heated, it changes into Mg2C3. The carbide, Mg2C3 reacts with H2O to form propyne. Mg2C3+4H3O→2Mg(OH)2+CH3CPropyne≡CH