H-NS regulates the flagellar master operon (flhDC) and thus is necessary for flagellation of Escherichia coli. However, the molecular mechanism of its regulation has remained unknown. Genetic screening of a transposon insertion abolishing the H-NS effect revealed a previously unidentified gene, named hdfR, encoding a LysR family protein. Binding of purified HdfR to the flhDC promoter was demonstrated by a DNA mobility shift assay, indicating that HdfR is a transcriptional regulator for the flagellar master operon. Furthermore, the expression of the hdfR gene was shown to be negatively regulated by H-NS.