Hamas leader Yehia Sinwar has for years overseen a secret police force in the Gaza Strip that conducted surveillance on everyday Palestinians and built files on young people, journalists and those who questioned the government, according to intelligence officials and a trove of internal documents reviewed by The New York Times.

The unit, known as the General Security Service, relied on a network of Gaza informants, some of whom reported their own neighbors to police. People landed in security files for attending protests or publicly criticizing Hamas. In some cases, the records suggest that authorities followed people to determine if they were carrying on romantic relationships outside marriage.

Hamas has long run an oppressive system of governance in Gaza, and many Palestinians there know that security officials watch them closely. But a 62-slide presentation on the activities of the General Security Service, delivered only weeks before the Oct. 7 attack on Israel, reveals the degree to which the largely unknown unit penetrated the lives of Palestinians.