On Thursday , Israeli troops killed a Palestinian gunman as he attempted to infiltrate the same settlement , in a botched attack that was claimed by the militant group , Hamas .