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 approximate to 8.5, H approximate to 1 GPa) is substantially higher than that of 2 (E approximate to 3, H approximate to 0.1 GPa), whilst its bulk modulus is relatively lower (approximate to 14 GPa cf. approximate to 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 LiN4 tetrathedron compared with the ZnN4 and BN4 units.