Diazocarbonyl compounds are much more stable than diazomethane. This is because the electron-withdrawing carbonyl group stabilizes the diazo dipole, so diazocarbonyls are a useful source of carbenes carrying a carbonyl substituent. The reaction of diazomethane with acyl chloride starts as a simple acylation to give a diazonium compound. If there is an excess of diazomethane a second molecule acts as a base to remove a rather acidic proton between the carbonyl and the diazonium group, to give the diazocarbonyl compound. Diazocarbonyl compounds can then be decomposed to carbenes by heat or light. The formation of very stable gaseous nitrogen compensates for the formation of the unstable carbene.