“Security forces stopped two persons who approached the border. One of them blew himself up and was killed. The other was wounded,” the ministry said in a statement.
Several Hamas security personnel were injured, and hospital officials said one of them died of his wounds.
Security sources quoted by Reuters said the suicide bomber was a member of a Salafi group that is a rival to Hamas.
A Hamas official speaking to Arab News avoided calling the assailant a member of a Salafi group based in Gaza, referring to him as “a person of deviant ideology.” The term is occasionally used by Hamas to describe Daesh members and other extremists.
“We condemn this hideous crime committed against our security forces by outlaws,” said Mosheer Al-Masry.
“We offer our condolences to the family of the martyred security victim, and we vow not to allow anyone to harm the security of our people in Gaza,” he added. “Our people reject deviant thoughts, which don’t serve our just Palestinian cause.”
There was no immediate claim of responsibility. It is the first time Hamas has been targeted in a suicide attack.
Egypt on Thursday opened the Rafah border crossing, Gaza’s main outlet to the outside world, for a fourth day to allow Muslims to embark on the Hajj pilgrimage in Saudi Arabia.
While Cairo has not yet commented on the suicide attack, some Egyptian analysts link it to the opening of the Rafah crossing.
“There’s a correlation that suggests that attacks near our borders increase whenever the Rafah crossing is open,” said Mohammed Noureddine, a former deputy of Egypt’s interior minister.
“Hamas beefed up border security in coordination with Egyptian authorities in an attempt to strengthen ties with Egypt,” he told Arab News.
“Despite the attack, Egyptian authorities won’t go back on the decision to open the border crossing in both directions for humanitarian cases.”
Hamas has sought to secure Gaza’s borders in order to improve relations with neighboring Egypt, which is battling a Daesh affiliate in the Sinai Peninsula bordering Gaza. Hamas has largely observed a truce with Israel since the 2014 Gaza war.