Essential for normal spermatogenesis and male fertility. Required for proper cell restructuring and DNA condensation during the elongation phase of spermiogenesis. Involved in the histone-protamine transition of sperm chromatin and the subsequent production of functional sperm. Binds both double-stranded and single-stranded DNA, ATP and protamine-1. In round and elongating spermatids, specifically localizes to a chromatin domain at the apical pole. Belongs to the histone H1/H5 family.