The Ff gene 5 protein (g5p) is considered to be a nonspecific single-stranded DNA binding protein, because it binds cooperatively to and saturates the Ff bacteriophage single-stranded DNA genome and other single-stranded polynucleotides. However, the binding affinity Komega (the intrinsic binding constant times a cooperativity factor) differs by over an order of magnitude for binding to single-stranded polynucleotides such as poly[d(A)] and poly[d(C)]. A polynucleotide that is more stacked, like poly[d(A)], binds more weakly than one that is less stacked, like poly[d(C)]. To test the hypothesis that DNA base stacking, a nearest-neighbor property, is involved in the binding affinity of the Ff g5p for different DNA sequences, Komega values were determined as a function of NaCl concentration for binding to six synthetic sequences 48 nucleotides in length: dA48, dC48, d(AAC)16, d(ACC)16, d(AACC)12, and d(AAACC)9A3. The binding affinities of the protein for these sequences were indeed found to be related to the nearest-neighbor compositions of the sequences, rather than to simple base compositions. That is, the g5p binding site, which is spanned by four nucleotides, discriminates among these sequences on the basis of the relative numbers of nearest neighbors (AA, CC, and AC plus CA) in the sequence. The results support the hypothesis that the extent of base stacking/unstacking of the free, nonbound ssDNA plays an important role in the binding affinity of the Ff gene 5 protein.