Hexamethylenetetramine, also known as methenamine, hexamine, or urotropin, is a heterocyclic organic compound with the formula (CH2)6N4.  This white crystalline compound is highly soluble in water and polar organic solvents.  It has a cage-like structure similar to adamantane.  It is useful in the synthesis of other organic compounds, including plastics, pharmaceuticals, and rubber additives. It sublimes in vacuum at 280 °C.

Synthesis, structure, reactivity
Hexamethylenetetramine was discovered by Aleksandr Butlerov in 1859.
It is prepared industrially by combining formaldehyde and ammonia:

 

The reaction can be conducted in gas phase and in solution.

The molecule has a tetrahedral cage-like structure, similar to adamantane. Four vertices are occupied by nitrogen atoms, which are linked by methylene groups. Although the molecular shape defines a cage, no void space is available at the interior for binding other atoms or molecules, unlike crown ethers or larger cryptand structures.

The molecule behaves like an amine base, undergoing protonation and N-alkylation (e.g. quaternium-15).

Applications
The dominant use of hexamethylenetetramine is in the production of powdery or liquid preparations of phenolic resins and phenolic resin moulding compounds, where it is added as a hardening component. These products are used as binders, e.g. in brake and clutch linings, abrasive products, non-woven textiles, formed parts produced by moulding processes, and fireproof materials.

Medical uses
As the mandelic acid salt (methenamine mandelate) or the hippuric acid salt (methenamine hippurate), it is used for the treatment of urinary tract infection.  In an acidic environment, methenamine is believed to act as an antimicrobial by converting to formaldehyde. A systematic review of its use for this purpose in adult women found there was insufficient evidence of benefit and further research is needed. A UK study showed that methenamine is as effective as daily low-dose antibiotics at preventing UTIs among women who experience recurrent UTIs. As methenamine is an antiseptic, it may avoid the issue of antibiotic resistance.

Methenamine acts as an over-the-counter antiperspirant due to the astringent property of formaldehyde.

Histological stains
Methenamine silver stains are used for staining in histology, including the following types:
Grocott's methenamine silver stain, used widely as a screen for fungal organisms.
Jones' stain, a methenamine silver-Periodic acid-Schiff that stains for basement membrane, availing to view the "spiked" Glomerular basement membrane associated with membranous glomerulonephritis.

Solid fuel
Together with 1,3,5-trioxane, hexamethylenetetramine is a component of hexamine fuel tablets used by campers, hobbyists, the military and relief organizations for heating camping food or military rations.  It burns smokelessly, has a high energy density of 30.0 megajoules per kilogram (MJ/kg), does not liquify while burning, and leaves no ashes, although its fumes are toxic.

Standardized 0.149 g tablets of methenamine (hexamine) are used by fire-protection laboratories as a clean and reproducible fire source to test the flammability of carpets and rugs.

Food additive
Hexamethylenetetramine or hexamine is also used as a food additive as a preservative (INS number 239). It is approved for usage for this purpose in the EU, where it is listed under E number E239, however it is not approved in the USA, Russia, Australia, or New Zealand.

Reagent in organic chemistry
Hexamethylenetetramine is a versatile reagent in organic synthesis. It is used in the Duff reaction (formylation of arenes), the Sommelet reaction (converting benzyl halides to aldehydes), and in the Delepine reaction (synthesis of amines from alkyl halides).

Explosives
Hexamethylenetetramine is the base component to produce RDX and, consequently, C-4 as well as octogen (a co-product with RDX), hexamine dinitrate, hexamine diperchlorate and HMTD.

Historical uses 
Hexamethylenetetramine was first introduced into the medical setting in 1895 as a urinary antiseptic. However, it was only used in cases of acidic urine, whereas boric acid was used to treat urinary tract infections with alkaline urine. Scientist De Eds found that there was a direct correlation between the acidity of hexamethylenetetramine's environment and the rate of its decomposition. Therefore, its effectiveness as a drug depended greatly on the acidity of the urine rather than the amount of the drug administered. In an alkaline environment, hexamethylenetetramine was found to be almost completely inactive.

Hexamethylenetetramine was also used as a method of treatment for soldiers exposed to phosgene in World War I. Subsequent studies have shown that large doses of hexamethylenetetramine provide some protection if taken before phosgene exposure but none if taken afterwards.

Producers
Since 1990 the number of European producers has been declining. The French SNPE factory closed in 1990; in 1993, the production of hexamethylenetetramine in Leuna, Germany ceased; in 1996, the Italian facility of Agrolinz closed down; in 2001, the UK producer Borden closed;  in 2006, production at Chemko, Slovak Republic, was closed. Remaining producers include INEOS in Germany, Caldic in the Netherlands, and Hexion in Italy. In the US, Eli Lilly and Company stopped producing methenamine tablets in 2002. In Australia, Hexamine Tablets for fuel are made by Thales Australia Ltd. In México, Hexamine is produced by Abiya.

References 

Nitrogen heterocycles
Tertiary amines
Preservatives
Antimicrobials
Fuels
Reagents for organic chemistry
Corrosion inhibitors
Heterocyclic compounds with 3 rings
Adamantane-like molecules
E-number additives