Cystic fibrosis (CF) is caused by mutations in the gene that encodes the cystic fibrosis transmembrane conductance regulator (CFTR) anion channel. In humans and pigs, the loss of CFTR impairs respiratory host defenses, causing airway infection. But CF mice are spared. We found that in all three species, CFTR secreted bicarbonate into airway surface liquid. In humans and pigs lacking CFTR, unchecked H(+) secretion by the nongastric H(+)/K(+) adenosine triphosphatase (ATP12A) acidified airway surface liquid, which impaired airway host defenses. In contrast, mouse airways expressed little ATP12A and secreted minimal H(+); consequently, airway surface liquid in CF and non-CF mice had similar pH. Inhibiting ATP12A reversed host defense abnormalities in human and pig airways. Conversely, expressing ATP12A in CF mouse airways acidified airway surface liquid, impaired defenses, and increased airway bacteria. These findings help explain why CF mice are protected from infection and nominate ATP12A as a potential therapeutic target for CF.