Plants counteract fluctuations in water supply by regulating all aquaporins in the cell plasma membrane. Channel closure results either from the dephosphorylation of two conserved serine residues under conditions of drought stress, or from the protonation of a conserved histidine residue following a drop in cytoplasmic pH due to anoxia during flooding. Here we report the X-ray structure of the spinach plasma membrane aquaporin SoPIP2;1 in its closed conformation at 2.1 A resolution and in its open conformation at 3.9 A resolution, and molecular dynamics simulations of the initial events governing gating. In the closed conformation loop D caps the channel from the cytoplasm and thereby occludes the pore. In the open conformation loop D is displaced up to 16 A and this movement opens a hydrophobic gate blocking the channel entrance from the cytoplasm. These results reveal a molecular gating mechanism which appears conserved throughout all plant plasma membrane aquaporins.