A spokesman for the Israel Defense Forces (IDF), Daniel Hagari, said it is thought that a rocket-propelled grenade hit a tank near two buildings they were in.
He said the buildings exploded probably as a result of mines that Israeli forces had placed there to demolish them.
The IDF says it is still investigating the details of the incident.
Israel has been seeking to eliminate Hamas since gunmen killed more than 1,300 people in the 7 October attacks.
At least 25,295 people have been killed in Gaza since the Israeli military launched a large-scale air and ground campaign in response, according to the Hamas-run health ministry. More are believed dead under rubble.
Follow us on: