The mechanisms that govern homeostasis of complex systems have been elusive but can be illuminated by mutations that disrupt system behavior. Mutations in the gene encoding the kinase WNK4 cause pseudohypoaldosteronism type II (PHAII), a syndrome featuring hypertension and hyperkalemia. We show that physiology in mice transgenic for genomic segments harboring wild-type (TgWnk4(WT)) or PHAII mutant (TgWnk4(PHAII)) Wnk4 is changed in opposite directions: TgWnk4(PHAII) mice have higher blood pressure, hyperkalemia, hypercalciuria and marked hyperplasia of the distal convoluted tubule (DCT), whereas the opposite is true in TgWnk4(WT) mice. Genetic deficiency for the Na-Cl cotransporter of the DCT (NCC) reverses phenotypes seen in TgWnk4(PHAII) mice, demonstrating that the effects of the PHAII mutation are due to altered NCC activity. These findings establish that Wnk4 is a molecular switch that regulates the balance between NaCl reabsorption and K+ secretion by altering the mass and function of the DCT through its effect on NCC.