The dense, anhydrous zeolitic imidazolate frameworks (ZIFs), Zn(Im)(2) (1) and LiB(Im)(4) (2), adopt the same zni topology and differ only in terms of the inorganic species present in their structures. Their mechanical properties (specifically the Young's and bulk moduli, along with the hardness) have been elucidated by using high pressure, synchrotron X-ray diffraction, density functional calculations and nanoindentation studies. Under hydrostatic pressure, framework 2 undergoes a phase transition at 1.69 GPa, which is somewhat higher than the transition previously reported in 1. The Young's modulus (E) and hardness (H) of 1 (E≈8.5, H≈1 GPa) is substantially higher than that of 2 (E≈3, H≈0.1 GPa), whilst its bulk modulus is relatively lower (≈14 GPa cf. ≈16.6 GPa). The heavier, zinc-containing material was also found to be significantly harder than its light analogue. The differential behaviour of the two materials is discussed in terms of the smaller pore volume of 2 and the greater flexibility of the LiN(4) tetrathedron compared with the ZnN(4) and BN(4) units.