The expression of Pap pili that facilitate the attachment of Escherichia coli to uroepithelial cells is shut off outside the host at temperatures below 26 degrees C. Ribonuclease protection analysis showed that this thermoregulatory response was rapid as evidenced by the absence of papBA transcripts, coding for Pap pilin, after only one generation of growth at 23 degrees C. The histone-like nucleoid structuring protein H-NS and DNA sequences within papB were required for thermoregulation, but the PapB and PapI regulatory proteins were not. In vivo analysis of pap DNA methylation patterns indicated that H-NS or a factor regulated by H-NS bound within the pap regulatory region at 23 degrees C but not at 37 degrees C, as evidenced by H-NS-dependent inhibition of methylation of the pap GATC sites designated GATC-I and GATC-II. These GATC sites lie upstream of the papBAp promoter and have been shown previously to play a role in controlling Pap pili expression by regulating the binding of Lrp, a global regulator that is essential for activating papBAp transcription. Competitive electrophoretic mobility shift analysis showed that H-NS bound specifically to a pap DNA fragment containing the GATC-I and GATC-II sites. Moreover, H-NS blocked methylation of these pap GATC sites in vitro: H-NS blocked pap GATC methylation at 1.4 microM but was unable to do so at higher concentrations at which non-specific binding occurred. Thus, non-specific binding of H-NS to pap DNA was not sufficient to inhibit methylation of the pap GATC sites. These results suggest that the ability of H-NS to act as a methylation blocking factor is dependent upon the formation of a specific complex of H-NS with pap regulatory DNA. We hypothesize that a function of H-NS such as oligomerization was altered at 23 degrees C, which enabled H-NS to repress pap gene expression through the formation of a specific nucleoprotein complex.