Metal organic frameworks (MOFs) are among the most exciting materials discovered recently, attracting particular attention for their gas-adsorption and -storage properties. Certain MOFs show considerable structural flexibility in response to various stimuli. Although there are several examples of 'breathing' MOFs, in which structural changes occur without any bond breaking, examples of transformations in which several bonds are broken and made are much rarer. In this paper we demonstrate how a flexible MOF, Cu-2(OH)(C8H3O7S)(H2O)center dot 2H(2)O, can be synthesized by careful choice of the organic linker ligand. The flexibility can be controlled by addition of a supplementary coordinating molecule, which increases the thermal stability of the solid sufficiently for direct imaging with electron microscopy to be possible. We also demonstrate that the MOF shows unprecedented low-pressure selectivity towards nitric oxide through a coordination-driven gating mechanism. The chemical control over these behaviours offers new possibilities for the synthesis of MOFs with unusual and potentially exploitable properties.