the formation of hydrocarbon hydrates can be inhibited or mitigated by contacting a a mixture comprising water and hydrate - forming guest molecules under gas hydrate forming conditions with a quaternary ammonium hydroxide qoh or a quaternary ammonium compound qa , in which a is not a halogen atom . the qoh or qa may be prepared reacting a quaternary ammonium halide qx with a metal hydroxide m x , or with a metal salt ma , in an alcohol solvent to form a quaternary ammonium hydroxide qoh , or a quaternary ammonium compound of formula qa , and metal halide mx . optionally , the quaternary ammonium hydroxide qoh may be reacted with an organic or inorganic acid ah which is different from a hydrogen halide to form the quaternary ammonium compound qa . the metal halide mx may be removed by phase separation after addition of water or of a water / solvent mixture , or by filtration .