A DNA-binding protein implicated in transcriptional repression and chromosome organization and compaction. 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 other proteins (By similarity). Homodimer that oligomerizes on DNA into higher-order complexes that form bridges between disparate regions of DNA compacting it. Belongs to the histone-like protein H-NS family.