The facility, located next to the Sheikh Zayed mosque, is an unfinished and abandoned five-story building in the al-Shati refugee camp, which was meant to be used for public or government services for the Palestinians, or at the very least for housing.
Instead, the IDF said it has been used for years as an urban warfare training facility for Hamas, and in recent months Hamas has also been using it to drill survival in the tunnels.
A tunnel was dug under the building, which connects to Hamas's massive underground tunnel network in the strip.
"Hamas continues using civilian infrastructure for military purposes, and in doing so endangers the civilians under its charge," the IDF said in a statement.
The Palestinians reported two teenagers aged 15 and 16 were killed in the strike on the building, which is located near a Hamas police and security compound. Ten others were reported wounded in the strike, which reduced the building to rubble.
Aerial photos released by the IDF on Sunday morning show the results of the attack on the Hamas battalion headquarters in Beit Lahiya in the northern Gaza Strip, which included offices, war rooms, storage areas, and an urban warfare training facility.
The aerial photos show the headquarters before and after the IAF bombing, with training facilities and some of the commanders' barracks destroyed. Facilities where weapons were manufactured and stored were also hit in the strikes.
"The battalion command's entire infrastructure has been destroyed, vaporized, turned into a giant hole," IDF Spokesman Brig. Gen. Ronen Manelis said Saturday.
Some 200 rockets were fired from the Gaza Strip at Israel on Saturday. Four Israelis were lightly hurt when a rocket hit outside their home.