We have utilized several heteronuclear dipolar-coupling based 27 Al/ 31 P, 31 P/ 11 B, 27 Al/ 11 B, 27 Al/ 29 Si, and 1 H/ 31 P double-resonance solid-state NMR techniques to characterize boroaluminophosphate (BAPO)-and silicoaluminophosphate (SAPO)-based mesoporous materials. For the hexagonal BAPO materials, the coordination geometry of the B atoms in the framework is exclusively tetrahedral. The fraction of B atoms that can be incorporated in the framework seems not to depend on the B content of the initial gel. For the vast majority of the framework B atoms, the coordination environment is B(-OP) 4 . The B-OAl linkages, however, also exist. The results indicate that the four-coordinated B atoms are not distributed randomly within the framework. Instead, they appear to be located on the channel surface. For the SAPObased mesophase, the connectivities between various P and Al sites were mapped and the chemical environments of different P sites were determined to be as follows: (HO) 2 P[OAl(oct)] 2 , (HO)P[OAl(tet)] x -[OAl(oct)] 3-x , and (HO)P[OAl(tet)] 3 . The Si-O-Al linkages were detected unambiguously.