Five Israeli soldiers were killed early Tuesday morning after heavily armed Hamas gunman got into the country through an underground tunnel, the Israeli military said.

The Israel Defense Forces said the militants tunneled in to attack the Israeli community of Nahal Oz.

The Times of Israel reported that four to seven gunmen emerged from the tunnel, which spanned about 150 yards inside Israel:

The assailants managed to reach a pillbox guard tower next to Kibbutz Nahal Oz, and fired an anti-tank missile at the small barracks attached to the pillbox. Five soldiers were killed in that attack.

The terrorists then charged at the position in an attempt to kidnap a soldier and bring him to the Gaza Strip, but a soldier in the top portion of the tower opened fire, hitting one of the attackers. Two other soldiers failed to fire their weapons.

The other Hamas gunmen dropped their weapons and slipped back into Gaza. Soldiers searching the area found a rifle and missiles left behind by the Palestinians. The IDF said that the soldier’s action prevented an infiltration into the kibbutz.

On Monday afternoon, four Israeli soldiers were killed when Hamas fired a mortar over the border into Israel.

An Israeli reserve soldier stands near a wall with the Star of David that was made from cardboard mortar shell boxes near the Israel Gaza border, Monday, July 28, 2014. A truce between Israel and Hamas militants in Gaza remained elusive as diplomats sought to end the fighting at the start of the Eid al-Fitr holiday, marking the end of the Muslim holy month of Ramadan. (AP Photo/Tsafrir Abayov)

An Israeli reserve soldier stands near a wall with the Star of David that was made from cardboard mortar shell boxes near the Israel-Gaza border, Monday, July 28, 2014. (AP Photo/Tsafrir Abayov)

Israel’s Ynet News reported that Hamas claimed responsibility for the attack.

“They attacked a fortified military watch tower of Nahal Oz where there were a great number of occupation soldiers,” Hamas’ military wing said in a statement.

An Israeli military official told Ynet that “one of the soldiers on the outpost noticed that the terrorists were attempting to drag one of the wounded soldiers (into the tunnel) and opened fire. They left behind four Kalashnikovs and an RPG missile.”

A building within the Gaza port is seen on fire after several strikes early on July 29, 2014. Five Israeli soldiers died in clashes with a Palestinian commando that tried to reach Israel through a tunnel at Nahal Oz, near the border with Gaza, the army said..(Photo: Mohammed Abed/AFP/Getty Images)

A building within the Gaza port is seen on fire after several strikes early on July 29, 2014. Five Israeli soldiers died in clashes with a Palestinian commando that tried to reach Israel through a tunnel at Nahal Oz, near the border with Gaza, the army said. (Mohammed Abed/AFP/Getty Images)

The IDF overnight pounded targets in Gaza, aiming at symbols of Hamas rule including the power plant, the sea port and the home of its leader in Gaza Ismail Haniyeh.

Hamas’ interior ministry said that Haniyeh was not hurt in the attack.

Israeli Prime Minister Benjamin Netanyahu on Monday evening prepared the Israeli public for a “long campaign” in Gaza that would end only after Hamas’ attack tunnels were destroyed.