Brain edema during hepatic encephalopathy or acute liver failure as well as following brain ischemia has a multifactorial etiology, but it is a dangerous and occasionally life-threatening complication because the brain is enclosed in the rigid skull. During ischemia the extracellular K+ concentration increases to very high levels, which when energy becomes available during reperfusion stimulate NKCC1, a cotransporter driven by the transmembrane ion gradients established by the Na+,K+-ATPase and accumulating Na+, K+ and 2 Cl− together with water. This induces pronounced astrocytic swelling under pathologic conditions, but NKCC1 is probably also activated, although to a lesser extent, during normal brain function. Redistribution of ions and water between extra- and intracellular phases does not create brain edema, which in addition requires uptake across the blood–brain barrier. During hepatic encephalopathy and acute liver failure a crucial factor is the close resemblance between K+ and NH4+ in their effects not only on NKCC1 and Na+,K+-ATPase but also on Na+,K+-ATPase-induced signaling by endogenous ouabains. These in turn activate production of ROS and nitrosactive agents which slowly sensitize NKCC1, explaining why cell swelling and brain edema generally are delayed under hyperammonemic conditions, although very high ammonia concentrations can cause immediate NKCC1 activation.