A DNA-binding protein implicated in transcriptional repression and chromosome organization and compaction. Binds AT-rich DNA, repressing its transcription; about 754/4438 tested genes (15%) bind to H-NS, 70% of these are AT-rich and correspond to horizontally transferred geness (HTG), thus playing a central role in silencing foreign genes (PubMed:16763111). This offers the selective advantage of silencing foreign DNA (PubMed:16763111). Binds nucleation sites in AT-rich DNA and bridges them, forming higher-order nucleoprotein complexes and condensing the chromosome (By similarity). A subset of genes are repressed by H-NS in association with Hha and/or YdgT (By similarity). Homodimer that oligomerizes on DNA into higher-order complexes that form bridges between disparate regions of DNA compacting it. Interacts with Hha, YdgT and StpA. Essential, it cannot be deleted unless additional mutations in rpoS and/or phoP are present; hns-rpoS or hns-phoP mutants grow slowly while triple mutants grow like wild-type. In a double hns-rpoS mutant 178 genes are down-regulated while 409/4529 were up-regulated compared to wild-type. Belongs to the histone-like protein H-NS family.