A new approach to the formation of mesoporous materials has been developed, based on a two-step `salt-gel' synthesis, in which mesoporous aluminophosphates, galloaluminophosphates, and aluminosilicates have been created. The first step involves pre-organizing charged inorganic clusters (MO4Al12(OH)24(H2O)12 7+, M = Al or Ga) into a layered mesoscopic material with oppositely charged organic surfactant molecules. In the second step, phosphate or silicate linker molecules are added, which diffuse through the cluster/surfactant salt, react with the clusters, and transform the layered precursor into a non-lamellar mesostructured material. Removal of the surfactant from the alumino- and galloaluminophosphates by anion-exchange and from the aluminosilicates by calcination results in mesoporous materials with BET surface areas up to 630, 455, and 431 m2/g, respectively. Direct condensation by calcination of polyoxoaluminate cluster salts without additional linkers produces nanometer-sized one-dimensional strings.