By combining the shape-selective intercalation reaction of ammonia into copper biphenylbis(phosphonate) with the nanogram sensitivitiy of the quartz crystal microbalance (QCM), it is possible to detect ammonia at gas-phase concentrations of 0.01-25%. Anhydrous copper biphenylbis(phosphonate), Cu-2(O3PC6H4-)(2), precipitates as lamellar microcrystals when solutions of Cu2+ and biphenylbis(phosphonic acid) are combined, and its structure is closely related to that of CU(O3PC6H5) Well-ordered and oriented thin films of this material were assembled on the gold electrodes of QCM devices by sequential adsorption of copper salts and biphenylbis(phosphonic acid). Ammonia intercalation occurs at two sites on the lattice copper atoms, one of which is irreversible at room temperature. Larger Lewis bases, such as butylamine isomers, are substantially excluded from the ammonia binding sites. The transport of ammonia into the films, which was monitored by the frequency change of the QCM device, is characterized by an effective diffusion coefficient of 5.6 x 10(-9) cm(2)/s. With ultrathin (<70 Angstrom) self-assembled films, the device reponse is relatively rapid and the ammonia intercalation reaction is 90% complete in 90 s or less.