Hydrothermal reaction of sodium metatungstate with the surfactant template cetyltrimethylammonium (CTA) hydroxide gave the salt (C19H42N)6(H2W12O40). Despite the superficial similarity of TEM micrographs and powder X-ray patterns of this material to those of mesoporous silicates, the salt contains unconnected Keggin ions H2W12O406-. These Keggin ions pack in a puckered layer arrangement and create roughly spherical cavities for the surfactant micelle counterions. Attempts to remove the template cations and condense the inorganic portion of the structure invariably lead to dense WO3-x phases. NbxW6-xO19(2+x)- (x = 2, 3, 4) clusters also formed layered salts with CTA cations, which were reacted with tetraethyl orthosilicate (TEOS). The TEOS molecules are absorbed, presumably into the hydrophobic portion of the structure, and can be hydrolyzed to form silica within the salt. Infrared and solid-state NMR double-resonance spectra show that the silica network is anchored to the clusters via covalent Nb-O-Si linkages. Extraction of the silica-modified salts with HCl/ethanol yields materials with both micropores and mesopores and specific surface areas up to 265 m2/g.