Ion binding to secondary active transporters triggers a cascade of conformational rearrangements resulting in substrate translocation across cellular membranes. Despite the fundamental role of this step, direct measurements of binding to transporters are rare. We investigated ion binding and selectivity in CLC-ec1, a H(+)-Cl(-) exchanger of the CLC family of channels and transporters. Cl(-) affinity depends on the conformation of the protein: it is highest with the extracellular gate removed and weakens as the transporter adopts the occluded configuration and with the intracellular gate removed. The central ion-binding site determines selectivity in CLC transporters and channels. A serine-to-proline substitution at this site confers NO(3)(-) selectivity upon the Cl(-)-specific CLC-ec1 transporter and CLC-0 channel. We propose that CLC-ec1 operates through an affinity-switch mechanism and that the bases of substrate specificity are conserved in the CLC channels and transporters.