Palestinian media reports say the explosion was an accident and the Hamas members were killed as they were dismantling an old Israeli missile that had failed to explode.
An Israeli military spokesperson denied that the Israeli military was involved.
Three other men were wounded from the blast, their conditions were not reported.
Since March 30, Palestinian protesters have engaged in weekly demonstrations at the Gaza-Israel border. Since the mass protests began more than 40 Palestinians have been killed and more than 5,500 injured, according to the U.N. Office for the Coordination of Humanitarian Affairs.