The disclosure relates to a process for the preparation of a sustained release pharmaceutical composition comprising an opioid analgesic is selected from buprenorphine, alfentanil, sufentanil, remifentanil and fentanyl, which comprises reaction of an aluminosilicate precursor material with an aqueous alkaline liquid comprising an inorganic base, wherein the aluminosilicate precursor material is metakaolin in the form of a powder with a grain size that is below about 30 &mum, and wherein the geopolymer material is formed by curing at about 40°C.