A massive tunnel built by the Hamas terror group in northern Gaza -- the "longest and deepest" one ever found -- has been destroyed after the Israeli military infiltrated the territory, officials said.

The passage near Nahal Oz was reported to be connected to a network of other tunnels in the Gaza Strip. Isreal's military said the tunnel was "kilometers" long, but the exact length and depth was not immediately clear.

“A tunnel in which millions of dollars were invested, money that instead of relieving the strain on residents, was buried in the sand,” Defense Minister Avigdor Liberman said after the tunnel was sealed up this weekend. “Residents of Gaza, Hamas is burning your money on tunnels to nowhere. We will get our hands on all of them.”

Israel had been monitoring construction of the tunnel network for years but decided to move in after tunnel diggers began working their way up to the surface, a military spokesman told The Times of Israel.

“This was clearly a terror tunnel that connected to other tunnels in the Gaza Strip,” Lt. Col. Jonathan Conricus said. “It extended into Israel and violated Israeli sovereignty.”

The tunnel went through a border section that Hamas, especially in the last two weeks, has turned “into an area of terror and fighting,” Israel’s military said.

It also was the fifth tunnel from Gaza to Israel that has been destroyed in recent months, according to Conricus, and it reportedly extended tens of yards into Israeli territory.

“The [Israeli Defense Forces] doesn’t seek an escalation. We are defending our borders,” Conricus told The Times of Israel. “We will not tolerate or allow Hamas to turn the border area into an active combat zone.”

Conricus said the tunnel was adjacent to the site of recent mass protests, which Israel says Hamas is using as a cover for attacks.

In the last two weeks, 28 Palestinians have been killed and more than 1,500 wounded by Israeli fire. The marches have been organized by Gaza's militant Hamas rulers, but large turnouts on two preceding Fridays were also driven by Gaza's dire living conditions and desperation among the territory's 2 million residents, who have been enduring a crippling border closure by Israel and Egypt since 2007, according to the Associated Press.

Conricus said Hamas began building the tunnel following the 2014 war. Israel and Hamas have fought three wars since 2008. During the most recent conflict in 2014, Israel destroyed 32 tunnels.

The Associated Press contributed to this report.