A DNA-binding protein implicated in transcriptional repression (PubMed:19521501) and chromosome organization and compaction. Modifies gene expression, regardless of whether the gene is chromosomal or was acquired by horizontal gene transfer (PubMed:19521501). Binds nucleation sites in AT-rich DNA and bridges them, forming higher-order nucleoprotein complexes and condensing the chromosome. As many horizontally transferred genes are AT-rich, it plays a central role in silencing foreign genes. A subset of genes are repressed by H-NS in association with Hha and/or Cnu (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. Altered expression of a significant number of genes; expression of an R27-plasmid encoded hns (AC Q9L5H8) restores wild-type expression to only a subset of these genes. Belongs to the histone-like protein H-NS family.