Guard cells regulate the influx and efflux of potassium ions, which in turn affects the osmotic flow of water. When guard cells take in potassium ions, water follows by osmosis, increasing turgor pressure and causing the stomata to open. Conversely, when potassium ions are expelled, water exits the cells, reducing turgor pressure and causing the stomata to close.