We use direct infrared measurements to determine the number of binding sites, their dissociation constants, and preferential interaction parameters for inorganic phosphate and sulfate anions in collagen fibrils from rat tail tendons. In contrast to previous reports of up to 150 bound phosphates per collagen molecule, we find only 1-2 binding sites for sulfate and divalent phosphate under physiological conditions and approximately 10 binding sites at low ionic strength. The corresponding dissociation constants depend on NaCl concentration and pH and vary from approximately 50 microM to approximately 1-5 mM in the physiological range of pH. In fibrils, bound anions appear to form salt bridges between positively charged amino acid residues within regions of high excess positive charge. In solution, we found no evidence of appreciable sulfate or phosphate binding to isolated collagen molecules. Although sulfate and divalent phosphate bind to fibrillar collagen at physiological concentrations, our X-ray diffraction and in vitro fibrillogenesis experiments suggest that this binding plays little role in the formation, stability and structure of fibrils. In particular, we demonstrate that the previously reported increase in the critical fibrillogenesis concentration of collagen is caused by preferential exclusion of "free" (not bound to specific sites) sulfate and divalent phosphate from interstitial water in fibrils rather than by anion binding. Contrary to divalent phosphate, monovalent phosphate does not bind to collagen. It is preferentially excluded from interstitial water in fibrils, but it has no apparent effect on critical fibrillogenesis concentration at physiological NaCl and pH.