Israel’s military said soldiers opened fire on Thursday after spotting two Palestinian gunmen near the Gaza border fence, and the Hamas militant group said one of its fighters was killed.