Israeli and Palestinian officials said Israeli troops had surrounded a house near Jenin in order to arrest the militants when gunfire broke out .