Ordered nonlamellar mesoporous aluminophosphates and galloaluminophosphates have been synthesized by introducing phosphate linking groups to cluster/surfactants salts of prearranged AlO4Al12(OH)24(H2O)127+ (Al13) and GaO4Al12(OH)24(H2O)127+ (GaAl112) tridecamers. The Al13 and GaA12 polyoxocations form a layered mesoscopic salt with the anionic surfactant, sodium dodecylsulfate. Upon the reaction with a buffered hydrogen phosphate/dihydrogen phosphate solution the layers of clusters are transformed into a nonlayered, nearly hexagonal mesoscopic phase. Removal of the surfactant from the alumino- and galloaluminophosphates by anion- exchange results in mesoporous materials with BET surface areas up to 630 and 455 m2/g, respectively. FT-IR and 27A1 and 31P MAS-NMR as well as 27A1 →31P cross-polarization experiments indicate that the phosphate treatment results in the formation of new bonds between aluminate and phosphate species. A fraction of the clusters are transformed leading to an increase in the number of tetrahedral aluminate groups in the product. Multiple anion- exchange, e.g., with acetate, dichromate, or naphthol yellow S ions, is possible in these open mesoporous structures, which form a new class of inorganic anion-exchangers.